Boost logo

Boost :

From: Thomas Matelich (sosedada_at_[hidden])
Date: 2000-05-08 08:15:57


Dietmar Kuehl wrote:

> Hi,
>
> > >I assume you have a class directory_iterator which contains a
> > >boost::shared_ptr member. All you should have to do is write an
> > >out-of-line destructor for directory_iterator, which gets declared
> > >in a source (not a header) file.
>
> ... and an assignment operator because the assignment operator might
> release the internal pointer, too.

I had asked a question about this a while ago, and never got it working
till just now. I kept getting the warning about releasing a pointer to an
undefined class. I realized that it was because I was returning a
shared_ptr by value from a function. Even though the function was not
called it warned about not being able to destruct the return. BTW, MSVC 6
sp3. Another item to add to the list of things to check for in a forward
declaration situation.

--
Thomas O Matelich
Senior Software Designer
Zetec, Inc.
sosedada_at_[hidden]
tmatelich_at_[hidden]

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk