On 10-10-31 5:32 PM, Koen Deforche wrote:
> We've fixed several bugs in Wt::Dbo since 3.1.3 (including memory bugs
> and transaction failure handling), any chance you can first see if
> this has been fixed with latest Wt (3.1.6) ?
>
Good news! All the leaks that I found were fixed. The only thing I would
still suggest is the following as a defensive programming practice (or
throw an exception):
--- a/vendor/Wt/Wt/Dbo/Session_impl.h Sun Nov 07 01:03:15 2010 -0400
+++ b/vendor/Wt/Wt/Dbo/Session_impl.h Sat Nov 06 23:00:27 2010 -0700
@@ -46,6 +46,11 @@
if (schemaInitialized_)
throw std::logic_error("Cannot map tables after schema was
initialized.");
+ // Already registered, no need to register again
+ ClassRegistry::iterator it = classRegistry_.find(&typeid(C));
+ if(it != classRegistry_.end())
+ return;
+
Mapping<C> *mapping = new Mapping<C>();
mapping->tableName = tableName;
--
Sohail Somani
--
iBlog : http://uint32t.blogspot.com
iTweet: http://twitter.com/somanisoftware
iCode : http://bitbucket.org/cheez
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest