Several changes (mostly graphics related) from Petteri Aimonen

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5385 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2012-11-23 15:49:06 +00:00
parent aecbc4a15c
commit e9d2baa274
3 changed files with 11 additions and 4 deletions

View File

@ -211,4 +211,6 @@
using the internal work queues from user space. I have decided to implemented using the internal work queues from user space. I have decided to implemented
user-space work queues (someday) in order to accomplish that functionaliy. user-space work queues (someday) in order to accomplish that functionaliy.
Submitted by Petteri Aimonen. Submitted by Petteri Aimonen.
* NxWidgets:CText and NxWidgets:CNumericEdite: Fix some memory freeing bugs
(from Petteri Aimonen).

View File

@ -158,9 +158,11 @@ CNumericEdit::CNumericEdit(CWidgetControl *pWidgetControl, nxgl_coord_t x, nxgl_
CNumericEdit::~CNumericEdit() CNumericEdit::~CNumericEdit()
{ {
delete m_label; // CNxWidget destroys all children
delete m_button_minus;
delete m_button_plus; m_label = 0;
m_button_minus = 0;
m_button_plus = 0;
} }
void CNumericEdit::getPreferredDimensions(CRect &rect) const void CNumericEdit::getPreferredDimensions(CRect &rect) const

View File

@ -276,11 +276,14 @@ const int CText::getLineTrimmedLength(const int lineNumber) const
length--; length--;
} }
while (iterator->moveToPrevious() && (length > 0)); while (iterator->moveToPrevious() && (length > 0));
delete iterator;
return length; return length;
} }
// May occur if data has been horribly corrupted somewhere // May occur if data has been horribly corrupted somewhere
delete iterator;
return 0; return 0;
} }