[odb-users] Memory leaks when using odb::session
Boris Kolpackov
boris at codesynthesis.com
Sun Sep 18 17:43:11 EDT 2016
Hi,
Michael Martín Moro <sexymimi64 at gmail.com> writes:
> I had to use odb::session to get a bidirectional relationship working. I
> noticed that whenever there's an odb::session active in a query, I end up
> with a lot of memory leaks pointing at memory allocated through odb.
You are probably using raw pointers for your objects. Use std::shared_ptr
instead (Section 3.3, "Object and View Pointers" in the manual).
Boris
More information about the odb-users
mailing list