Dears I found that only shared_ptr can use allocator. Is there any possibility to join the existing allocator and the other smart_ptrs. Why the rest smart_ptrs can not use allocators? Regards. -- |\/\/| Seweryn Habdank-Wojewódzki \/\/
Seweryn Habdank-Wojewódzki:
Why the rest smart_ptrs can not use allocators?
The other smart pointers don't allocate any memory.
But they are doing deallocation, isn't it?
scoped_ptr and scoped_array call delete and delete[] respectively. We don't currently have a smart pointer that uses Allocator::destroy and Allocator::deallocate for that. The usual way of overriding the allocation/deallocation for scoped_ptr is to supply a class-specific operator new/delete. What is your specific use case?
Hi
scoped_ptr and scoped_array call delete and delete[] respectively. We don't currently have a smart pointer that uses Allocator::destroy and Allocator::deallocate for that. The usual way of overriding the allocation/deallocation for scoped_ptr is to supply a class-specific operator new/delete.
What is your specific use case?
Am trying to design and develop experimental distributed container. And allocator should be allowed to allocate memory through the network. This is experimental design rather scientific than production code. Regards. -- |\/\/| Seweryn Habdank-Wojewódzki \/\/
participants (2)
-
Peter Dimov
-
Seweryn Habdank-Wojewódzki