Re: boost::shared_ptr weirdness
- From: "Murray Cumming" <murrayc murrayc com>
- To: "Justin Kirby" <justin-news openaether org>
- Cc: gtkmm-list gnome org
- Subject: Re: boost::shared_ptr weirdness
- Date: Thu, 13 Oct 2005 08:54:27 +0200 (CEST)
> Paul Davis <pjdavis engineering uiowa edu> writes:
>
>> Has anyone ever noticed weird behavior with boost::shared_ptrs and
>> widgets? I've been getting some random segfaults when closing my
>> programs. They seem to be coming from removing a container that
>> contains a widget that is a member of an object referenced by a
>> shared_ptr. I think. I haven't gotten it to be reproducible. I'm
>> just using this as a shot in the dark to see if there are documented
>> no-no's for using boost's shared pointers or something.
>
>
> boost::shared_ptr<> is not thread safe. Other than that, they behave
> like any other object. I tend to use Glib::RefPtr<> in gtkmm code
> and boost::shared_ptr<> in libs and other non UI dependent code.
valgrind's memcheck is incredibly useful for these kinds of problems.
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]