Hi John, shouldn't that be: delete dboSession_; delete connection_;
delete will invoke the destructor for you. It's almost always wrong to manually call a destructor. Regards, Wim. 2011/3/17 John Robson <[email protected]>: > Koen, I reimplement the destructor: > > WtApplication::~WtApplication() { > dboSession_->~Session(); > connection_->~SqlConnection(); > } > > Too view running sessions in PostgreSQL: > > $ sudo su postgres -c psql postgres # connect > > postgres=# SELECT * FROM pg_stat_activity; # lista as sessões > or > postgres=# SELECT COUNT (*) FROM pg_stat_activity; > > Thank you, > John > > On 03/16/2011 05:52 PM, Koen Deforche wrote: >> Hey John, >> >> 2011/3/16 John Robson <[email protected]>: >>>> Do you also delete the Wt::Dbo::backend::Postgres object when your Wt >>>> session exits? >>> >>> No, where I use this? in the class destructor? How? >> >> See examples/blog/view/BlogView.[hC] and examples/blog/BlogSession.[hC] >> >> You should reimplement the destructor of a widget or the application, >> or embed the connection and session objects directly in these classes. >> >> Regards, >> koen > > > > ------------------------------------------------------------------------------ > Colocation vs. Managed Hosting > A question and answer guide to determining the best fit > for your organization - today and in the future. > http://p.sf.net/sfu/internap-sfd2d > _______________________________________________ > witty-interest mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/witty-interest > ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
