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 » PostgreSQL Session.Open Leak??
Re: PostgreSQL Session.Open Leak?? [message #14281 is a reply to message #14278] Thu, 21 February 2008 16:14 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14265
Registered: November 2005
Ultimate Member
indiocolifa wrote on Thu, 21 February 2008 09:49

Yesss,,,, fixed it!

The last line of main is now:

delete G_STATE;


G_STATE is a macro so, it's equal to:

delete globalState::getInst();


since getInst returns a pointer, it's all ok.


Well, well, that is the price of NOT using U++ way od programming:)

We have nice Single template.

Remove these statics and just use Single<GlobalState>() instead of GlobalState::getInst. Also, your version is MT broken (depends on compiler); Single is guaranteed to work.

No well-behaved program should contain similar "delete" Smile

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: updating/discarding table data on dialogs...
Next Topic: Can't fetch row...
Goto Forum:
  


Current Time: Sun Jul 06 11:24:03 CEST 2025

Total time taken to generate the page: 0.04294 seconds