[fpc-pascal] methods of an object to create others objects
    Graeme Geldenhuys 
    graemeg.lists at gmail.com
       
    Wed Jul  7 00:09:58 CEST 2010
    
    
  
On 7 July 2010 00:04, Andrew Brunner wrote:
>
> You got that right.  Which is my point exactly.  If free blows out w/o
> a nested exception handle to catch it... The entire object goes into
> limbo and will never be free and thus cause a memory leak.
Even with a try..except, if you call MyObj.Free and it causes an
exception, you are screwed either way and it will always cause a
memory leak. Best is no notify the user some how, or crash out of the
program, or fire the programmer for not writing enough unit tests. :)
-- 
Regards,
  - Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
    
    
More information about the fpc-pascal
mailing list