Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » [BUG] Memory leak in MySql package
Re: [BUG] Memory leak in MySql package [message #39925 is a reply to message #39921] Sat, 11 May 2013 17:19 Go to previous messageGo to previous message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Mirek,

I sorry, I have sent wrong header file. Of course, we need to add "counter" code to constructor and destructor.

MySqlSession()       { numberOfInstances++; mysql = NULL; Dialect(MY_SQL); }
~MySqlSession()      { numberOfInstances--; Close(); }


I would like to relate to putting EXITBLOCK. In my option counter method is more efficient, because memory can be free at runtime. On the other hand, EXITBLOCK will make order when the program ends. Of course, I can be wrong what EXITBLOCK is doing. I have never used it in my applications.

I have attached improved version of this patch.

Sincerely,
Klugier


U++ - one framework to rule them all.
 
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 May 03 09:21:38 CEST 2024

Total time taken to generate the page: 2.04607 seconds