You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
They directly call standard operators, requiring having custom deleters everywhere or editing the source code when integrating EASTL into any project which involves dynamic linking (as overriding new and delete is not supported for DLLs).
Making them use the default allocator is one very simple solution which would at least provide the same allocation as other EASTL types.
The text was updated successfully, but these errors were encountered:
make_unique is by definition a utillity to create a new-ed object, which will be deleted by a call to delete. (although eastl::make_unique doesn't perfectly mirror the std::make_unique) the standard proposal that added std::make_unique has a good explanation on why users should simply create their own utility function if they want to use their own allocator & deleter. Specifically, see section 3.4.
Understood. But wouldn't it make more sense to at least make them use the default allocator? This would ensure the entire library has a single default point of allocation, according to the FAQ: EASTL never uses global new / delete / malloc / free. All allocations are done via user-specified allocators, though a default allocator definition is available.
There is no way to directly override allocation in
make_unique
anddefault_delete
.They directly call standard operators, requiring having custom deleters everywhere or editing the source code when integrating EASTL into any project which involves dynamic linking (as overriding new and delete is not supported for DLLs).
Making them use the default allocator is one very simple solution which would at least provide the same allocation as other EASTL types.
The text was updated successfully, but these errors were encountered: