[odb-users] memory leak

Boris Kolpackov boris at codesynthesis.com
Tue Jan 14 09:43:26 EST 2014


Hi,

黄川 <buptstehc at gmail.com> writes:

> Hi,all! when i test inserting data multiple times , the handles occupied by
> my program is increasing from process manager in windows

If you have code like this:

for (int i = 0; i < 1000000; ++i)
{ 
  odb::transaction t (db_->begin());
  db_->persist(m);
  db_->execute(sql);
  t.commit();
}

Then all the resources allocated by ODB are released at the end of each
iteration. There, however, could still be some resources that are
allocated and cached by the underlying database library. In this
case what you should see is an initial increase in resources which
stops growing over time.

Boris



More information about the odb-users mailing list