[redland-dev] Re: [patch] librdf_free_foo(0)

Michael Stahl Michael.Stahl at Sun.com
Thu Apr 24 09:33:48 BST 2008


Sebastian Trüg wrote:
> Full ack. I actually wrote myself wrapper methods for that but then again I am 
> a C++ developer....

well, yes, all of my code looks like this:

     const boost::shared_ptr<librdf_node> pNode(
         librdf_new_node_from_blank_identifier(m_pWorld.get(), NULL),
         librdf_free_node);
     if (!pNode) {
         throw RuntimeException...
     }
so, imagine my surprise when i learned the hard way that that won't work :)


-- 
"C++ is a horrible language. It's made more horrible by the fact that a
  lot of substandard programmers use it, to the point where it's much much
  easier to generate total and utter crap with it. Quite frankly, even if
  the choice of C were to do *nothing* but keep the C++ programmers out,
  that in itself would be a huge reason to use C." -- Linus Torvalds



More information about the redland-dev mailing list