A New Krazy Checker for Methods Returning const refs

Richard Dale richard_dale at tipitina.demon.co.uk
Tue Apr 17 09:49:35 BST 2007


On Sunday 15 April 2007, Jos van den Oever wrote:
> So what about returning pointers?
>
> I agree with the general idea. kdelibs contains highlevel libraries
> and as such the API should be easy and relatively foolproof as well as
> easy to generate bindings for.
For bindings, I would say pointer and reference types are easier to deal with 
that value types, because you have to take a copy of the value type which the 
bindings runtime is responsible for deleting on garbage collection. With a 
pointer or a reference you don't have to take a copy, and the instance 
doesn't need deleting on garbage collection as the C++ world is responsible 
for deleting it.

-- Richard





More information about the kde-core-devel mailing list