mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
fixed memory leak
This commit is contained in:
parent
e75aaa6f33
commit
0ef5487e6f
@ -1658,7 +1658,9 @@ void cLeMenuRecordings::ClearCurrentElement(void) {
|
||||
}
|
||||
|
||||
void cLeMenuRecordings::Set(const cRecording *recording, int level, int total, int New) {
|
||||
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);
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user