please help with GetRealSpline/Memoryleak

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 22/05/2009 at 12:42, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   r11 
Platform:      
Language(s) :     C++  ;

---------
Hi , i am using this code to get a user spline from an input field and create a clone to be able to for example read out points with "vPosition = splineObj->GetSplinePoint(ccpos, 0, NULL);"

  
if(userSpline)       
{             
splineObj = ((BaseObject* )(userSpline->GetClone(COPY_NO_BITS, NULL)))->GetRealSpline();  
}  
  
everything works well, except that once again i have a memory leak. i think i have to free something, but what?? it isnt the splineObj, but i guess its something that happens when using GetRealSpline().. which i need to use, since the use should be able to use parametric splines...  
  
thanks for any hints,  
cheers, ello  

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 22/05/2009 at 13:28, xxxxxxxx wrote:

The memory leak is your clone, I guess.
You should store the pointer to the clone in a separate Variable, get the real spline from it and then free the clone after use.

Cheers,
Jack

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 22/05/2009 at 13:52, xxxxxxxx wrote:

thank you.. got it working