Am 21.09.2014 um 07:22 schrieb Hans-Peter Diettrich:
> Boian Mitov schrieb:
>> That is easy. it gets incremented when it gets assigned. The running threads 
>> have no way of
>> accessing it if there is no reference (assignment) already in place.
> 
> The problem arises when an object is destroyed, or even elected for 
> destruction in _Release, while
> another thread starts using the same instance.

This is not possible for a correctly written program: if two threads having 
references to the same
instance, the ref. count is 2. So no destruction is possible.

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

Reply via email to