On Nov 29, 2003, at 6:35 PM, John W. Krahn wrote:



AFAIK all variables have a reference count.

the concern is in the land of



my $c = { a => { k =>1 } }; my $a = $c->{a}; my $b = \$c; Dump $c;

SV = RV(0x815440) at 0x80a270
  REFCNT = 2
  FLAGS = (PADBUSY,PADMY,ROK)
  RV = 0x8012b8
  SV = PVHV(0x809f90) at 0x8012b8
    REFCNT = 1
    FLAGS = (SHAREKEYS)
    IV = 1
    NV = 0
    ARRAY = 0x104740  (0:7, 1:1)
    hash quality = 100.0%
    KEYS = 1
    FILL = 1
    MAX = 7
    RITER = -1
    EITER = 0x0
    Elt "a" HASH = 0xf27a483d
    SV = RV(0x815438) at 0x80a1ec
      REFCNT = 1
      FLAGS = (ROK)
      RV = 0x801180
      SV = PVHV(0x809f60) at 0x801180
        REFCNT = 2
        FLAGS = (SHAREKEYS)
        IV = 1
        NV = 0
        ARRAY = 0x104720  (0:7, 1:1)
        hash quality = 100.0%
        KEYS = 1
        FILL = 1
        MAX = 7
        RITER = -1
        EITER = 0x0
        Elt "k" HASH = 0x9c6b9c21
        SV = IV(0x80a544) at 0x801264
          REFCNT = 1
          FLAGS = (IOK,pIOK)
          IV = 1

and in particular the problem of
what happens in the sequence

my $c =  { a => { k =>1 } };
my $a = $c->{a};
my $b = \$c;
Dump $c;
$c = ();
Dump $c;
Dump $a;

Since as some here are aware unless one can get the
ref count to 0 the memory can not be reallocated,
and that there are Uglies that can occur when there
are odd segments that are no longer politely referencable
which is the leading cause of memory leaks.

Not wishing to get 'too technical' and all...

ciao
drieux

---

Jason, remember when I said,
        If you can't be brilliant
                at least keep the drieux amused
well sometimes 'stoopid' is as 'stoopid does'
and if you stay around you can learn more than
you really wanted to know about opening that
box of chocolates...



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to