[Gambas-user] Bug
Benoît Minisini
gambas at ...1...
Fri Aug 26 19:23:43 CEST 2011
> > It is not setting a different object reference to the same variable, it
> > is removing the object reference from the variable.
> >
> > "a" is a pointer to an instance of a newly instantiated Class1 object.
> > Setting "a" to null is perfectly valid. "a" then no longer points to an
> > instance. Therefore the object reference count is decremented (in this
> > case to 0, so the object memory can be freed).
>
> I'm OK with this, it just created confusion as it was not allowed earlier.
>
It was allowed since the first line of code of Gambas 1, and it is allowed in
all object oriented languages I know. :-)
--
Benoît Minisini
More information about the User
mailing list