Boost logo

Boost Users :

From: Darryl Green (Darryl.Green_at_[hidden])
Date: 2003-11-12 22:09:52


> -----Original Message-----
> From: James Mastro [mailto:jmastro_at_[hidden]]
> Sent: Thursday, 13 November 2003 11:59 AM
> To: Boost Users mailing list
> Subject: [Boost-users] boost::shared_ptr inside std::list
>
>
> This one has been driving me nuts all day. In a function I have the
> following:
>
> std::list< boost::shared_ptr<MyObject> > * objectList;

An uninitialized pointer to a list of shared pointers to MyObject is
probably not what you wanted, but its what you defined.
I don't think you bug has anything to do with shared pointers...

>
>
> When debugging my code, the debugger (gdb) dies upon entering the
> function with this in it. It says "The Debugger has exited
> due to signal
> 11 (SIGSEGV).The Debugger has exited due to signal 11
> (SIGSEGV)." My dev
> tools felt the need to say it twice for some reason. I pulled this out
> and put it in a new project all by itself with the same result.
>
> If I make it not be a pointer, like this:
>
> std::list< boost::shared_ptr<MyObject> > objectList;
>
> then there's no problem.

Regards
Darryl.

##########################################################################
This e-mail is for the use of the intended recipient(s) only. If you have
received this e-mail in error, please notify the sender immediately and
then delete it. If you are not the intended recipient, you must not use,
disclose or distribute this e-mail without the author's prior permission.
We have taken precautions to minimise the risk of transmitting software
viruses, but we advise you to carry out your own virus checks on any
attachment to this message. We cannot accept liability for any loss or
damage caused by software viruses.

##########################################################################


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