Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Ironically enough, the Adobe Source Libraries has a <a href="http://stlab.adobe.com/classadobe_1_1version__1_1_1capture__allocator.html" rel="nofollow noreferrer"><code>adobe::capture_allocator</code></a> class that was written specifically with this kind of DLL safety in mind. The way it works is to capture the local <code>new</code> and <code>delete</code> at this point it is instantiated, and to carry them both around for the lifetime of the object. (See <a href="http://stlab.adobe.com/structadobe_1_1version__1_1_1new__delete__t.html" rel="nofollow noreferrer"><code>adobe::new_delete_t</code></a> for details on how it does this, especially the implementation <a href="http://stlab.adobe.com/memory_8hpp_source.html#l00674" rel="nofollow noreferrer">here</a>.) Deallocations take place with the captured <code>delete</code> routine, guaranteeing that no matter where you are you are deleting with the proper <code>delete</code>.</p> <p>You can see <code>capture_allocator</code> used throughout the <a href="http://stlab.adobe.com/namespaceadobe_1_1version__1.html" rel="nofollow noreferrer"><code>version_1</code></a> types in the Adobe Source Libraries, such as <a href="http://stlab.adobe.com/classadobe_1_1version__1_1_1any__regular__t.html" rel="nofollow noreferrer"><code>adobe::any_regular_t</code></a> and <a href="http://stlab.adobe.com/classadobe_1_1version__1_1_1copy__on__write.html" rel="nofollow noreferrer"><code>adobe::copy_on_write</code></a>. <code>capture_allocator</code> should be compatible with all STL container types as well.</p> <p>Update: <code>capture_allocator</code> is not standard-compliant because it retains state. This should not be a big hindrance to its usability, but it does mean its use is not guaranteed to work with standard-compliant containers. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload