U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ SQL » [BUG] Memory leak in MySql package
Re: [BUG] Memory leak in MySql package [message #39719 is a reply to message #39714] Sat, 20 April 2013 15:05 Go to previous messageGo to previous message
Klugier is currently offline  Klugier
Messages: 1118
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Alboni,

You are absolutly right, We need to count global number of MySqlSession instances. If the number of instances falls to zero we need to call mysql_library_end().

I use a memory profiler called valgrind. I invoke him with following command:
valgrind --tool=memcheck --leak-check=full --show-reachable=yes ./ProgramName


I enclose completed patch for this issue. I have added new static variable to count number of instances (numberOfInstances) of the class MySqlSession.

Sincerely,
Klugier


U++ - one framework to rule them all.

[Updated on: Sat, 20 April 2013 15:35]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Reason why session does not connect
Next Topic: Sql(SqlSession& session) problem
Goto Forum:
  


Current Time: Fri Jun 12 08:31:30 GMT+2 2026

Total time taken to generate the page: 0.00535 seconds