Skip to content

Commit

Permalink
Fix memory leak in OwnedLinkedObjectListTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Mar 4, 2021
1 parent cbaa655 commit aabf4f2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sming/Core/Data/LinkedObjectList.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ template <typename ObjectType> class LinkedObjectListTemplate : public LinkedObj
template <typename ObjectType> class OwnedLinkedObjectListTemplate : public LinkedObjectListTemplate<ObjectType>
{
public:
~OwnedLinkedObjectListTemplate()
{
clear();
}

bool remove(ObjectType* object)
{
bool res = LinkedObjectList::remove(object);
Expand Down

0 comments on commit aabf4f2

Please sign in to comment.