💬 C++ core guidelines에 따르면 메모리 관리는 RAII가 되는 smart pointer를 권장하고 있다.하지만 이미 레거시 코드에 녹여져 있는 new/delete는 어떻게 해야 하나?🤔 또 malloc/free는?😨C++에서 malloc/free를 못 본 것 같긴 하지만 간단히 new/delete와의 차이점을 정리하고 new/delete를 좀 더 쪼개서 동작시키는 내용을 정리해 본다. 🚀 우선 new/delete 동작 원리를 알아보자.Examplenew/delete를 사용한 프로그램 코드이다.class Point{ int x, y;public: Point(int a, int b) { std::cout ResultPoint()~Point() 주석 1, 2의 동작 원리를 정..