I strongly disagree... I think there is a great value in a reference counted object, especially if we can enable/disable that with virtual method or even better attribute ;-) .
Then you will have it any way you want :-) .

Hi Boian
I do not mind if this is done on a derived object. As Marco said earlier, one can do anything form his base root object. Just don't do it to the root class

Personally, I operate from a base class descending from TPersistent. Down the hierarchy I do have reference counted base class (done explicitly). If I want it implicitly, I would pass interface around. I do explicitly reference count some objects. However, in other cases (I posted earlier) this is a huge problem. Someone also mentioned the issue of race conditions in multithreaded environments. I can see this happening to me. I would not mind declaring a class implicitly reference counted (an all descendants, presubably). However, not TObject.


Peter


With best regards,
Boian Mitov

-------------------------------------------------------
Mitov Software
www.mitov.com
-------------------------------------------------------
-----Original Message----- From: Peter Popov
Sent: Saturday, September 20, 2014 4:11 AM
To: fpc-devel@lists.freepascal.org ; Sven Barth
Subject: Re: [fpc-devel] Suggestion: reference counted objects

Please do not reference count TObject. This is a uniquely bad and
unnecessary idea. I will switch to ANSI C if you guys do it

Peter


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

Reply via email to