Information générale
Catégorie:
Codage, syntaxe et commandes
The premises are not all correcting.
So in your case, the first call was passing reference x "by value",
and you had a copy of x, called Z in the method, which was pointing to the object.
This is correct
You assign null to the object, now both z and x point to a memory block containing a null.
This is mistaken.
You assign Null to the Z variable, the object is not touched.
Don't know whether this has something to do with reference counting,
This is very simple: by Value increment RefCount semaphore, by Reference not change RefCount semaphore.
To the end you have understood all. Very good.
Hi Dragan.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement