andremussche / scalemm

Fast scaling memory manager for Delphi
https://code.google.com/p/scalemm/
Other
98 stars 22 forks source link

smmGlobal.implementation uses SysUtils which forces SysUtils to initialize before scalemm, resulting in memory leaks #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
How to reproduce:
ScaleMM_v212.zip
Delphi 2010, scalemm.pas is the first unit in the application. Run the program, 
close it. Observe runtime error 216.

More details:
SysUtils has a class destructor for TEncoding, which kills any encodings 
created during the application run. Since they are created on first access, 
their memory resides in scalemm.
Class destructors run with the same priority finalization runs, and if ScaleMM 
relies on SysUtils then SysUtils is initialized before, and finalized after 
ScaleMM.

Suggested fix:
Just comment out SysUtils in smmGlobal.pas, nothing uses it anyway it seems.

Original issue reported on code.google.com by himse...@gmail.com on 16 Dec 2012 at 3:15

GoogleCodeExporter commented 9 years ago
already fixed in subversion some time ago, will make a new zip file (version 
2.15)

Original comment by andre.mussche on 17 Dec 2012 at 7:45