THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/12/2002 at 17:51, xxxxxxxx wrote:
Cinema 4D Version: 8.012
Platform: Windows ;
Language(s) : C++ ;
GetRealSpline() :: In the documentation it says that "The created spline object. The object owns the pointed spline." I assume this means that a new object is generated from the function that should eventually be destroyed by me. When I do delete it C4D crashes internally later ( seconds after the operation that uses GetRealSpline ). So the question is if I should be freeing the object returned from GetRealSpline() or if I should use it and never free it?
darf - bhodiNUT
On 14/12/2002 at 00:51, xxxxxxxx wrote:
You are the "caller", the object is the "object". So you don't need to destroy the spline returned by GetRealSpline() since the "object" owns it. (If you have created the "object" as well, for example with SendModelingCommand(), then you of course need to destroy that object. But never what is returned from GetRealSpline().)
If the SDK had said "The caller owns the pointed spline." then it would be as you thought. (Or rather, the documentation would have been wrong...
On 14/12/2002 at 01:00, xxxxxxxx wrote:
Uhh, ok. Since the function returns a pointer to an object I got confused. It works...