std::vector<Point>* FindPoints()

{

   std::vector<Point>* result = new std::vector<Point>();

   //...

   return result;

}


이게 좋지 못한 코드의 유형이라는데...


나중에 delete 로 날려버리는데 왜 이게 좋지 못한건지 이해를 못하겠어.


stackoverflow 에서 봤다가 언어의 장벽에 부딪쳐서 여기로 옴 ㅠ

http://stackoverflow.com/questions/5060996/why-is-creating-stl-containers-dynamically-considered-bad-practice