dbTalk Databases Forums  

memory leak when running with mysql++ or so it seems

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss memory leak when running with mysql++ or so it seems in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ankur G35 Saxena
 
Posts: n/a

Default memory leak when running with mysql++ or so it seems - 03-30-2006 , 12:03 PM






Hi,
I have a program which receives a packet from another application
and processes it against the DB depending on whats passed. The
structure of the program is event driven, so I have a class which
listens to the socket and puts whatever is coming to a Queue. A
callback function reads whats on the Q and processes it by dispatching
to other functions depending on the type of the message received(to
query diff DBs).

Now once the message has been dispatched to the appropriate function,
i open a connection, create a query and run select and insertion
querries and i return from the function back to the message handler
and out of that, so in this case, the connetions should automatically
disconnect and release any memory. But after running 10-15k times, i
see many connections in incorrect states and the memory usage of the
application becomes 20-30% of the system, I cant imagine that no
object is getting destroyed since they go out of scope.

What seems to be the problem here? do I have to mannually do the
cleanup, do I need to disconnect everytime? The memory usage shouldnt
increase to this level in any event, it starts from 2-3mb and goes
upto 100-150mb.

Also is there a quick way i can set connection to stay alive for
every(until the program quits).

Thanks
Ankur

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.