Re: [fpc-devel] Suggestion: reference counted objects

2014-09-28 Thread Constantine Yannakopoulos
​Hi Sven,​ On Sat, Sep 27, 2014 at 7:33 PM, Sven Barth wrote: > Huh? Delphi really prohibits such things inside the destructor? Would you > mind to share an example (possibly including error messages), please? > ​Sorry, I wasn't clear enough. ​ ​With ​"prohibits" I didn't mean that you get a co

Re: [fpc-devel] Suggestion: reference counted objects

2014-09-27 Thread Constantine Yannakopoulos
On Sat, Sep 27, 2014 at 4:36 PM, Sven Barth wrote: > There are however some nasty problems inside constructors and destructors, > because "Self" is reference counted as well (and should be after all as we > don't want the instance to be destroyed behind our backs suddenly). The parenthesis can

Re: [fpc-devel] Suggestion: reference counted objects

2014-09-20 Thread Constantine Yannakopoulos
On Sat, Sep 20, 2014 at 1:52 PM, Sven Barth wrote: > It's basically easy, yes, but then one has to deal with code like this: > > === code begin === > > somestrlist.AddObject('Foobar', TObject(42)); > > === code end === > This sort of typecast was usually used to implement associative arrays in D