PeterPanino / thtmlviewer

Automatically exported from code.google.com/p/thtmlviewer
Other
0 stars 0 forks source link

Memory Leak in TFrameSetBase.LoadFromString #384

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Which steps will reproduce the problem?

Memory leak in TFrameSetBase.LoadFromString

The line EV.Doc := TBuffer.Create(Source, Name) creates an object but the 
memory is never freed.

Suggest wrapping the following text in a try...finally block to ensure EV.Doc 
is freed at the end of the method.

Original issue reported on code.google.com by baylis.a...@gmail.com on 1 Nov 2014 at 7:08

GoogleCodeExporter commented 9 years ago
Thanks for spotting this issue

Original comment by OrphanCat on 7 Nov 2014 at 10:13

GoogleCodeExporter commented 9 years ago
r488 should fix this issue.

You cannot free the buffer in any case as it might be passed to the Frame via 
PEV and the Frame takes over ownership of it.

Please test, if r488 fixes your issue as well as mine.

Original comment by OrphanCat on 7 Nov 2014 at 10:18

GoogleCodeExporter commented 9 years ago
Thanks - confirming that memory leak is fixed.

Original comment by baylis.a...@gmail.com on 7 Nov 2014 at 11:53