Original Post
I'm using boost::smart_ptr and creating instances of a smart pointer in a tight loop. I create the object, use it and then delete it. I print out the pointer using std::cout and for the first 62 iterations, the value is always the same. On the 63rd iteration, the pointer value I see printed out is different. At this point my program crashes as the pointer dereferenced by the smart pointer is invalid. Is there some memory resource I'm exhausting here? It's coincidental it's always the same iteration that fails. I'm using Fedora Core 2 on GCC 3.3.3, but I've tested it with the same problem on PCLinuxOS, using GCC 4. I'd post some more code, but it's quite complex due to the class structure, so I'll try to pick and post bits out later if I have time. Thanks