Help for this page

Select Code to Download


  1. or download this
    {
      my $a;
      $a = \$a;  # reference count of $a increases to 1
    }            # $a goes out of scope, but $a stays in use because of it
    +s reference count
    
  2. or download this
      my $a;
      $a = \$a;  # reference count of $a increases to 1
      undef $a;  # reference count decreases to 0
    }            # $a goes out of scope, $a gets freed because of its refe
    +rence count of 0
    
  3. or download this
      $retVal = $someObject->bar()->doSomething();
      $retVal = \$retVal;
    
  4. or download this
      my $myVal = $someObject->bar()->doSomething();
      $retVal = \$myVal;