[fpc-devel] Interface scope incompatibility with Delphi

Michael Van Canneyt michael at freepascal.org
Wed Nov 10 10:56:12 CET 2010



On Wed, 10 Nov 2010, Graeme Geldenhuys wrote:

> Op 2010-11-10 11:30, Michael Van Canneyt het geskryf:
>>
>> It depends. You're not supposed to make assumptions on when an interface
>> goes out of scope.
>
> I'll search the mailing list archives for those explanations, thanks. I
> don't immediately understand why this is a problem, because the RTL is not
> a "managed code" environment with garbage collection. So I guess most
> developers would expect common "out of scope" rules apply. When a local
> variable is defined and you leave that method/procedure, it's out of scope.
>
>
>> why this assumption is false, and that indeed FPC is not compatible to
>> Delphi in this regard, and that this will not be changed.
>
> Then this is bad news indeed. Another blow to trying to improve FPC built
> application debugging. :-(

Well, the original coders made assumptions which they're not supposed to make.

Nowhere is the Delphi behaviour guaranteed, not even by Delphi. They're just
taking for granted that Embarcadero will never change this behaviour...
For instance, on 64-bits - once it comes out -  the code may stop functioning 
as well.

Michael.



More information about the fpc-devel mailing list