farshadmohajeri / extpascal

Automatically exported from code.google.com/p/extpascal
49 stars 28 forks source link

TExtObject.AddTo causes memory leaks if called on an already constructed instance. #71

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
TExtObject.AddTo is a constructor. As such, it will always call 
AfterContruction. This means that if you call AddTo on an already constructed 
instance, AfterConstruction is called twice. Since AfterConstruction is often 
used for initialization, this causes memory leaks and missing finalizations.

Original issue reported on code.google.com by nando.dessena on 7 Oct 2011 at 3:54