physics.stop or physic.pause

I am a bit confused, i am using physic and i have several scenes where i use it,levels

The problem is if i put a physic.stop in exitScene when i come back there is no any body…Yes, i placed a physic.start on enterScene…

With physic.pause it works fine…but my question is if i am not going to increase the memory use lettin it paused…

I am working in the first level, so i dont know how to make the rest…

Also, do i have to place local physics = require “physics” in every scene or only in the main.lua without local?

Please a bit of light. [import]uid: 113117 topic_id: 23871 reply_id: 323871[/import]

You should only have to require physics once :slight_smile:

I’m not 100% sure on memory usage when physics is paused but you could test this very easily, run;

[lua]local function monitorMem(event)
collectgarbage(“collect”)

print( “\nMemUsage: " … (collectgarbage(“count”)/1000) … " MB”)
print("Texture Usage " … system.getInfo( “textureMemoryUsed” ) / 1000000)

return true
end

Runtime:addEventListener(“enterFrame”, monitorMem)[/lua]

And check results when physics is stopped and again when physics is paused. [import]uid: 52491 topic_id: 23871 reply_id: 96250[/import]