Re: Glib::RefPtr and Pointer



On Wed, 2007-11-07 at 00:36 +0100, Andreas Volz wrote:
[snip]
> But now a function in IconBrowser try to access m_refListModel and my
> application crash. I debugged into it and the problem is that
> m_refListModel is NULL in that case. But if I stop before at the setup
> of m_refListModel there is a real value for it.
> 
> Now the really interesting problem: If I copy the memory address of
> m_refListModel from my debugger and paste it into m_refListModel before
> accessing it from my callback function than it works.
> 
> So the question is: Could you imagine why my RefPtr lost his value if I
> access it from within the callback?
> 
> If you need more code or info to help me, than please tell me.

I strongly recommend that you try valgrind. It should tell you when you
are trying to access something that you shouldn't be accessing. And if
you are accessing something that was freed then it will tell you when it
was freed.

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]