Wednesday, June 20, 2007

Re: pointers are unique?

Hi George
 
When u talk about deleting a memory address what exactly do u actually mean-It does not mean u delete any memory area but rather it means that u free portion of d dynamic memory which was allocated to the object at runtime so I believe there is of course a possibility that the same memory area can be taken up by another object unless of course the developer forgets to de allocate the memory allocated thus resulting in a memory leak.
 
So talking about delete from the OS point of view does not quite mean that whatever u delete from th UI is actually deleted but rather that the reference entity pointing to d memory area gets allocated 2 Null permanently and hence cannot point to d memory area it was earlier pointing to.
 
Correct me if i am wrong guys,.
 
Regards
Saurabh

 
On 6/20/07, gexarchakos <gexarchakos@gmail.com> wrote:

Hello everyone,

just a question on pointers:
Assume that you dynamically allocate memory for an object. Sometime
later, you dynamically delete it...
Is there a possibility that another dynamically created object will
take the same memory address as one previously deleted? In that case,
pointers cannot work as IDs of objects, right?

To me it makes sense if there is such a possibility. I'd like your
opinion...

Thanks,
-- George






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To post to this group, send email to Cpp-Programming@googlegroups.com
To unsubscribe from this group, send email to Cpp-Programming-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Cpp-Programming?hl=en
-~----------~----~----~----~------~----~------~--~---

0 Comments:

Post a Comment

<< Home