in reply to Dissapearing from under one's reference

My first answer is to run it and see. You have the test code.

For the sake of discussion, no the reference will not disappear. The reference count for %var is incremented once when you declare in the block. When you assign \%var, the reference count gets incremented again. When control exits the block, the reference count is decremented and tested. If it is 0, %var will return to the heap from which it came.

Quick math says, though, that 1+1-1=1 != 0. %var will not get destroyed and the reference will still be there.

mikfire

  • Comment on Re: Dissapearing from under one's reference