
On 06/06/2005 08:58 AM, Lorenzo Bettini wrote:
Hi
I have this simple program, that has a class with a shared pointer to another object of the same type: [snip] I do not know in advance whether the shared pointer refers to the same object or to another different object (for instance I perform also cp->set(cp2)).
[snip]
However, it is not clear to me how to use weak_ptr in this context...
can some one provide some clue, please?
I don't know, but there's been a discussion on comp.lang.c++.moderated where Le Chaud Lapin has volunteered to convert code which used garbage collection (shared_ptr or otherwise) to one which didn't. Try posting there. The header for this post is: From: "Le Chaud Lapin" <unoriginal_username@yahoo.com> Newsgroups: comp.lang.c++.moderated Subject: Re: Pathology Of Bad Software Architecture Date: 6 Jun 2005 05:24:05 -0400