LAB: Replace some uses of malloc() with new
This commit is contained in:
parent
156ad539ff
commit
0e886461d0
6 changed files with 18 additions and 16 deletions
|
@ -63,7 +63,7 @@ Gadget *createButton(uint16 x, uint16 y, uint16 id, uint16 key, Image *im, Image
|
|||
|
||||
void freeButtonList(GadgetList *gadgetList) {
|
||||
for (GadgetList::iterator gadget = gadgetList->begin(); gadget != gadgetList->end(); ++gadget) {
|
||||
free(*gadget);
|
||||
delete *gadget;
|
||||
}
|
||||
|
||||
gadgetList->clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue