mirror of
				https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
				synced 2023-10-19 15:58:31 +00:00 
			
		
		
		
	fixed memory leak
This commit is contained in:
		| @@ -1658,7 +1658,9 @@ void cLeMenuRecordings::ClearCurrentElement(void) { | ||||
| } | ||||
|  | ||||
| void cLeMenuRecordings::Set(const cRecording *recording, int level, int total, int New) { | ||||
|     this->recording = new cRecording(recording->FileName()); | ||||
|     if (!this->recording) { | ||||
|         this->recording = new cRecording(recording->FileName()); | ||||
|     } | ||||
|     this->level = level; | ||||
|     this->total = total; | ||||
|     this->New = New; | ||||
| @@ -1787,6 +1789,18 @@ void cLeMenuRecordings::RenderCurrent(void) { | ||||
|     currentRecording->Parse(); | ||||
| } | ||||
|  | ||||
| void cLeMenuRecordings::Clear(bool forceClearBackground) { | ||||
|     delete recording; | ||||
|     recording = NULL; | ||||
|     cListElement::Clear(forceClearBackground); | ||||
| } | ||||
|  | ||||
| void cLeMenuRecordings::Close(void) { | ||||
|     delete recording; | ||||
|     recording = NULL; | ||||
|     cListElement::Close(); | ||||
| } | ||||
|  | ||||
| char *cLeMenuRecordings::RecName(const char *path, int level) { | ||||
|     char *recName; | ||||
|     const char *startName = path; | ||||
|   | ||||
| @@ -40,7 +40,7 @@ public: | ||||
|     bool DoScroll(void) { return current; }; | ||||
|     void Render(void); | ||||
|     virtual void RenderCurrent(void) { }; | ||||
|     void Close(void); | ||||
|     virtual void Close(void); | ||||
|     int ListShiftTime(void) { return ShiftTime(); }; | ||||
|     int ShiftDistance(void); | ||||
|     eOrientation ShiftOrientation(void); | ||||
| @@ -283,6 +283,8 @@ public: | ||||
|     void Set(const cRecording *recording, int level, int total, int New); | ||||
|     bool Parse(bool forced = true); | ||||
|     void RenderCurrent(void); | ||||
|     void Clear(bool forceClearBackground = false); | ||||
|     void Close(void); | ||||
| }; | ||||
|  | ||||
| /****************************************************************** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user