[Lazarus] Unicode branch

Hans-Peter Diettrich DrDiettrich1 at aol.com
Thu Jun 27 22:32:11 CEST 2013


Graeme Geldenhuys schrieb:
> On 2013-06-27 11:45, Hans-Peter Diettrich wrote:
>> Automatic reference counting works pretty well, doing it manually is 
>> asking for trouble.
> 
> Sometimes it becomes trick (at least with reference counted interfaces).
> eg: I have code where I pass a interface around, but don't want the
> reference count to increment - so you need to take special precaution.
> Then I also have a container that holds references to interfaces, but
> again I don't want the container to increment reference counts - which
> would normally be the case.  Sometimes the opposite is also true.

I see no valid reason for doing so.

> Then there is also the question of when does the interface or object get
> freed - timing is sometimes important too. eg: I can't use some of the
> code I used to use in Delphi with interfaces, because the code
> "apparently" relies on undocumented Delphi language behaviour (even some
> commercial apps rely on that same behaviour). Free Pascal frees the
> Interface instances at different times to Delphi - so the code in my
> application under Free Pascal had to be changed. More info: Google mouse
> cursor management with Interfaces, or look at CodeSite's method tracing
> abilities.

I don't see how this is related to managed objects.

DoDi





More information about the Lazarus mailing list