스마트 포인터에 대한 정리RAII(Resource acquisition is initialization) 패턴객체가 쓰이는 Scope를 벗어나면 Resource를 해제해주는 기법bool error() { return true;}void fnc() { int* c = new int[100]; if (error()) return; delete[] c;}int main(void) { fnc(); _CrtDumpMemoryLeaks(); return 0;}Detected memory leaks! Dumping objects -> {156} normal block at 0x00C60C58, 400 bytes long. Data: CD CD CD CD CD CD CD ..