Boost logo

Boost :

From: Thomas Matelich (sosedada_at_[hidden])
Date: 2000-09-13 17:39:14

Greg Colvin wrote:

> From: Thomas Matelich <sosedada_at_[hidden]>
> > For my purposes (simplifying things for my users), I need both templated
> > constructers and deleters. Essentially, I want to hide all use of dynamic
> > allocation and deallocation. I've been working on a class to do this. I just
> > started with shared_ptr and went from there. I'll paste the code in and then
> > describe my problems afterward
> I can't tell from your code how you intend for it to be used.
> I also don't know what you mean by "templated constructors",
> as your Newer trick is used only in shared_resource::reset().

Newer can also be used in the non-default constructor.

> The usual way to hide allocation is with a factory function,
> which it seems in your case could return a shared_ptr, but I'm
> still not clear on what problem you are trying to solve.

The factory may be a good avenue to look at and may take care of most of the
reasons I got into this. I will look into it. I will expound more on the problem
I'm working with tomorrow.

Thomas O Matelich
Senior Software Designer
Zetec, Inc.

Boost list run by bdawes at, gregod at, cpdaniel at, john at