So I can't seem to find what does generate memory leakage in the next code.
My main looks like this
int main() {
MovieRepo rep;
_CrtDumpMemoryLeaks();
return 0;
}
And MovieRepo class looks like this:
class MovieRepo{
protected:
vector<Movie> all;
public:
MovieRepo(){}
~MovieRepo(){}
}
And the Movie class looks like this:
class Movie {
std::string title;
std::string genre;
std::string star;
int year;
public:
Movie(){}
~Movie(){}
}
The error I am getting from crtdbg:
Detected memory leaks!
Dumping objects ->
{152} normal block at 0x0094E710, 8 bytes long.
Data: < 9 > DC FB 39 00 00 00 00 00
Object dump complete.
Any idea?
Aucun commentaire:
Enregistrer un commentaire