Tuesday, December 21, 2010

Dangling Pointer

There is a concept in computer programming known as 'dangling pointer'. 

What a pointer basically means is that it is sort of a label, an address, which gives the computer the address location of the object the computer is looking for. The object can be a port address to any hardware device, an object in memory, anything.  

To maintain a list of pointers is an efficient way to handle things because the function of pointers is similar to maintaining an address book for everything which the computer can refer to and take use of whenever it needs anything. 

Everything is fine and dandy till due to some reason you happen to delete an object completely but the pointer pointing to it remains. 

This pointer, which now is actually pointing to nothing because the object it was pointing to has been deleted, if not corrected causes serious complications in the efficient running of the computer, as serious as the complete crashing of the system because there could be many links pointing to it, depending on the object the pointer pointed towards. 

This type of pointer, which actually refers to nothing, but still is there in the address book memory of a computer is called a 'dangling pointer'. This dangling pointer is a false pointer, a pointer which actually is serving no purpose and would infact cause trouble if other pointers depended on it.

This case of dangling pointer or dangling references is pretty much similar to our thoughts about a 'self'. The thought of 'I', this label of 'I' which the mind has assigned to refer to something in its address book, actually points to nothing. There is nobody home. 

There is nothing. 

There is no you. 

There is no self. 

Look. 

No comments:

Post a Comment