JDB_InitBhvr question

Scott Beebe

Reputable Poster
Does any one know the ramifications for calling JDB_InitBhvr at the beginning of a function and failing to call JDB_FreeBhvr at the end? I working at a client that has lots of custom code that was coded like this. My initial reaction is that this is bad. Resources are getting allocated and never released. Since I don't know everything that JDB_InitBhvr does I am not sure if I should go through and quickly fix every function where they have done this or if should just leave it be for now and clean it up later when I have time.

Any insights?
 
The only reason not to use JDB_InitBhvr is if manual commit is being used.

There will be multiple calls to the db if JDB_InitBhvr is not used, as you well know, it groups db requests from the calling app.
 
For better memory management there should be JDB_FreeBhvr at end. There are chances of memory leak if not coded properly.

Chan
 
Back
Top