This little piece of code in TCustomSynEdit.Destroy only frees the parent TList but leaves the objects pointed to in the same TList in memory, producing a memory leak:
fHookedCommandHandlers := nil;
fPlugins := nil;
I suggest modifying this to (for example):
if Assigned(fHookedCommandHandlers) then
for I := 0 to fHookedCommandHandlers.Count - 1 do
if Assigned(fPlugins) then
for I := 0 to fPlugins.Count - 1 do
... which does free the objects pointed to, provided these objects have got a proper destructor of course.
Log in to post a comment.