Skip to content
Snippets Groups Projects
Commit 10e26bd8 authored by Matthew McGill's avatar Matthew McGill
Browse files

VariantID_t's destructor frees File_t objects

Former-commit-id: e9d0f8d6aa435a2edf62ef432b81c725a31c8cf4
parent 67c6b8ba
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,8 @@ class VariantID_t : public BaseObj_t
{
public:
VariantID_t(); // create a Variant ID not in the database
VariantID_t(db_id_t pid); // read from the DB
VariantID_t(db_id_t pid); // read from the DB
~VariantID_t(); // Deletes the File_t objects -- beware dangling File_t* in FileIR_t objects!
bool IsRegistered();
bool Register(); // accesses DB
......
......@@ -38,6 +38,19 @@ VariantID_t::VariantID_t() :
}
VariantID_t::~VariantID_t()
{
for(std::set<File_t*>::iterator
it = files.begin();
it != files.end();
++it
)
{
delete *it;
}
}
void VariantID_t::CreateTables()
{
// note: this tables are now part of File_t.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment