My first comment is the way to declare and create an object manipulated by Handle.
You never have to manipulate pure C++ pointers.
Your function could be written as follow :
Handle(Geom_CartesianPoint) myPointFunc( float x_, float y_, float z_ ) { Handle(Geom_CartesianPoint) _point = new Geom_CartesianPoint( x_, y_, z_); return _point; }
You never have to create explicitly the Handle object by a call to the constructor. It is directly the constructor of Geom_CartesianPoint which creates the Handle.
Now how is managed objects manipulated by Handle ?
The Handle is an object manipulated by value which has as field a pointer on an entity object.
This entity object has as field a use count which is automatically incremented by the call of the constructor.
For the assignement between two Handles the use count of the left member is incremented and the use count of the right member decremented.
As soon as the use count field becomes to zero the handle an the object addressed are destroyed.
If now in your function you go out of the scope of your Handle variable a call to the destructor is inserted by the compiler and called which in a first time decrement the use count and if it is null destroyed the object.
In consequence you never have to call explicitly the destructor of an object manipulated by Handle. All the new delete operator= methods are overloaded to manage correctly the memory.