Correct clean up procedure

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Correct clean up procedure

Postby Slick » Thu Nov 21, 2013 8:55 pm

What calls need to be made to properly remove a dynamic object that also has some joints attached. Do you just call delete or is there a correct way? I looked at the lumberyard joints demo and don't see clean up code.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: Correct clean up procedure

Postby Julio Jerez » Thu Nov 21, 2013 9:27 pm

you can do either way.

-if you delete a joint, the joint will be deached and only the joint will be delete it.
-if you delete a body, the body will delete al teh joint that are conetected to that body.

basically you do not has to worrry abpy deleting joints unless you what to detach a joint for the bodies that is linked to.

are you checkind the ogre newton or the sandbox demos?
-in those demos whn eth workd is destroy, the word delete everything. you can set a break point on the destructors of the joints of
the body and see where it gets called from.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Correct clean up procedure

Postby Slick » Fri Nov 22, 2013 12:09 pm

ok thanks. I was getting a crash from what seemed like a destructor. Probably something in my code from converting to 3.xx so I'll check some more.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: Correct clean up procedure

Postby Slick » Fri Nov 22, 2013 6:57 pm

I am getting some more asserts but can't work out yet what is causing it.

11-22-2013 2-54-53 PM.png
11-22-2013 2-54-53 PM.png (7.84 KiB) Viewed 1723 times


this is the call stack:

11-22-2013 2-55-32 PM.png
11-22-2013 2-55-32 PM.png (45.79 KiB) Viewed 1723 times
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest