[fpc-pascal] methods of an object to create others objects

Marcos Douglas md at delfire.net
Wed Jul 7 14:46:53 CEST 2010

On Wed, Jul 7, 2010 at 9:30 AM, Andrew Brunner
<andrew.t.brunner at gmail.com> wrote:
> Ok.  I think I understand the discrepancy in our reasoning.  The issue
> is when exceptions are raised during Obj.Free.  I think it would help
> if you would assume that all exceptions raised in Obj.Free were
> handled - since my assertion is all developers using a non-managed
> platform like FPC.  I'm saying that because if memory is allocated,
> and deallocated you will not blow-out the memory manager in FPC.
> Meaning, if you catch your exceptions FATAL errors will not even occur
> and there will be NO NEED to worry about restarting an application.

But, even using nested handled the memory may be impaired so,
you need restarting the application.

> Its a clean way of thinking.  I have no worries.  When I call Obj.Free
> it can raise exceptions, and still recover to the calling methods -
> whether we are talking about ObjX.free or ObjX.DoSomething.
> My basic point is that just because an exception is raised does not
> mean the method will blow-out.  It will be handled.  LOL... With
> exception handling (often nested) where required.

Your application will continue running, if that is what you meant when you said
not to worry. But the memory may not be 100%, even using nested handled.


More information about the fpc-pascal mailing list