std::allocator / new, delete overloading 소개 및 활용


std::allocator  / new, delete overloading 소개 및 활용

이번에는 실제 개발하면서 유용하게 사용하고 있는 것들에 대해서 소개를 해볼까 한다. 1. std::allocator stl container 내부에서 heap 메모리 할당시에 사용하는 할당자를 을 직접 구현할 수 있도록 도와주는 class template 이다. 처음 접할 땐 이걸로 뭘할 수 있는지 바로 떠오르긴 힘들지만 개발을 하다보니 이 template 을 통해 아주 많은 것들을 할 수 있다는것을 알게 되었었다. referece site : https://en.cppreference.com/w/cpp/memory/allocator std::allocator - cppreference.com template< class T > struct allocator; (1) template struct allo..


원문링크 : std::allocator / new, delete overloading 소개 및 활용