[fpc-pascal] "is" for interfaces patch

Michael Van Canneyt michael at freepascal.org
Thu Mar 31 02:51:01 CEST 2005

On Thu, 31 Mar 2005, ml wrote:

> operator "is" is finished, but before I send patch I would like to
> correct one other problem with "as" (my previous patch was not enough to
> fix all problems with refcount, it was enough to correct all others
> though).
> refcount now works correctly with :=, GetInterface, QueryInterface and
> "is"
> a := (obj as IA); // works
> b := (obj as IA); // works
> but as soon as you invoke again
> a := (obj as IA);
> or
> b := (obj as IA);
> it decrements one. Funny thing is that this doesn't happen the first
> time, but any later try to set the same variable decrements one and
> doesn't stay the same as it should. (and that only happens with "as")

It's probably something with the temp variable used in the assignment.
But the compiler captains would have to confirm that.


More information about the fpc-pascal mailing list