$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] how to release element from ptr_map?
From: archie14 (admin_at_[hidden])
Date: 2010-07-28 12:55:26
Thorsten Ottosen <nesotto <at> cs.aau.dk> writes:
>
> archie14 skrev:
> > I have an instance of ptr_map<int, classA>. I need to release an element
from the map and use it somewhere else...
> Does
>
> ptrmaptype::auto_type ptr = val.release(val.begin());
>
> not work??
>
> Then you can call ptr.release() to get the naked ptr.
>
> HTH
>
> -Thorsten
>
Yes, it works, thanks for the help. I think that I started with auto_type, got
compile error and moved to try other types. Now it works. Thanks again.