> On Apr 6, 2017, at 7:45 PM, Sven Barth via fpc-pascal 
> <fpc-pascal@lists.freepascal.org> wrote:
> 
> Arrays are reference counted, class instances are not. So if the compiler 
> would blindly free the instance after it goes out of scope if might free 
> something that another code part still uses.
> 

I was thinking about just calling a method notifying the object it went out of 
the scope it was declared in. The user could then keep track of ref counting 
themselves and choose how to handle the case. Personally I want to enable this 
manually on some objects that I know I didn’t outside of the scope and that 
would be a handy way to manage this.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to