[Gc] dangling pointer

Hans Van den Eynden hans.vandeneynden at pandora.be
Mon Nov 8 23:00:37 PST 2004


The primairy goal of the GS is to avoid dangling pointers. But thus the 
GC also secure against dangling references too the stack??
for example:

int& dangling_reference() {
    int x=3;
    return x;
}

main{
    int x=dangling_reference();    //x is now dangling
}




More information about the Gc mailing list