Aug 14, 2010 at 11:47 PM
Edited Aug 15, 2010 at 2:07 PM
I've put down a few more hours on the garbage, but I can't figure out what I'm doing wrong. I've now updated to the latest FP3 build 75526. I let go of the large problem for the moment and started at the bottom, just getting rid of all base garbage. I get
garbage every time my Dynamic test object collides(at least with a static one). It doesn't matter if I have any events hooked up or not(like OnCollision or BeginContact). If I add gravity and the objects fall down it's only when they initially hit a
static object garbage is generated, not by lying there.
XNA Framework Remote Performance Monitor, Delta results
A Dynamic object lying still on a static sensor:
Managed Bytes Allocated: 5000-6000
Managed Objects Allocated: 200-300
Dynamic object repeatedly forced in to a wall(static):
Managed Bytes Allocated: 2800-3000
Managed Objects Allocated: 100-300
Any idea what I might be doing wrong?
I changed all static objects to dynamic ones. No obvious garbage when objects colliding. But a wake object standing on a sensor still generates gabage, but in difference to if the sensor is static theres only garbage if you first wake the object..
Still testing, I've been doing the same things as last edit on your new simplesample. I added a static rectangle and a sensor rectangle to sample 1. I was quirous why there was no garbage there. I updated my game so it uses Fixturefactory.Create.... instead
of as in the old testbed PolygonTools.Create... -> BodyFactory.CreateBody... -> body.CreateFixture. This change removed all garbage when colliding with objects. But not the sensor issue. So then I changed to a Circle which most our moving objects
are in the simplesample. Now the SimpleSample sensor generates garbage to. So it seams like the sensor issue is:
CircleObject(maybe all non rectangle) on sensor.
When testing to change all gameobjects to rectangles almost all garbage disapeared not only onsensor garbage but also the main problem I explained in my first post.