Opened 19 years ago

Closed 18 years ago

Last modified 12 years ago

#181 closed Support Requests (None)

Can you use boost::pool with a smart_ptr

Reported by: nobody Owned by: Peter Dimov
Milestone: Component: smart_ptr
Version: None Severity:
Keywords: Cc:

Description

Hi,

The program I am writing will create and delete a lot
of objects.  
These objects will be referenced from multiple places.

Obviously, I need a shared_ptr, however, I am worried
about the performance during creation and deletion

Can you use a boost::pool interface with the shared_ptr?

I have tried using the pool, object_pool,
singleton_pool interfaces but I can't get the
constructor to run on my object.

If I use the pool_alloc interface I have to use a
container.

Basically, I want to allocate objects from a memory
pool and have these object pointed to by
smart/shared_ptr so that when all of the references to
the object are gone the object is deleted.

Can anyone help me?  


Change History (2)

comment:1 by nobody, 19 years ago

Logged In: NO 

 Here is my email address:

jo@atsresults.com

comment:2 by Peter Dimov, 18 years ago

Status: assignedclosed
Note: See TracTickets for help on using tickets.