[Bug libstdc++/26875] Array allocator use count is shared between array_allocator instances

bart dot vanassche at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Mar 27 10:53:00 GMT 2006



------- Comment #4 from bart dot vanassche at gmail dot com  2006-03-27 10:53 -------
(In reply to comment #3)
> Confirmed.  Though it looks like this is a fundamental problem of the interface
> provided.  Should be documented so though.  Also destroying an array allocator
> instance does not reset the __array_used value, so only ever one allocator
> instance per Type/Storage can be used even sequentially after each other.

I don't think it's an interface problem -- IMHO changing __array_used into a
(non-static) member of class array_allocator<> would solve this issue.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26875



More information about the Gcc-bugs mailing list