Boost logo

Boost Users :

From: bringiton bringiton (kneeride_at_[hidden])
Date: 2006-11-14 22:36:24


Can anyone offer advice on detecting circular references with shared_ptrs.

I have a large app, 50+ classes, and most objects are managed with
shared_ptrs. No consideration has gone into avoid circular references,
so I'm sure there will be a few in there.

I thinking that looking though all the classes and their attributes
will take a while. Any suggestions/advice in finding circular
references (so i can use weak_ptrs)?

I was thinking of maybe getting a tool that draws the class diagram.
Or having a base class for all my classes that reference count to a
global variable to detect the number of leaks.

It seems the shared_ptr is a good idea for memory management, but it
opens up the original problem of memory leaks...


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net