|
Boost Users : |
From: Olga Gerchikov (ogerchikov_at_[hidden])
Date: 2006-01-11 00:22:02
Suppose I have this function in c++:
int* f(int size)
{
int * array = new int[size];
return array;
}
Is there a safe idiom to prevent memory leak? Should i use auto_ptr in
C++?
Or should I use the smart pointer library in boost? Which is the
simplest solution?
Thank you.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net