Is it possible that if I'm making a a simple drag-n-drop game, does making a new sprite via constructor with texture as a parameter makes the game slower and depletes more memory until it crashes or does making a new texture via constructor cause the memory to go slow? I'm on a revision for the new drag-n-drop puzzle game where the only goal is to stack the most no. of objects as you can before it falls off the platform. Is it a good idea to create another sprite with texture as a parameter every time a player drag-n-drop another object?
Here's the start of the dry run looked like and I set it to debug mode so that the platform is completely block the pit to test the replication test.
Afterwards, when it reaches from hundreds to thousands, this will be like this and the game gets slower.
When the game crashes, here's the result via Logcat:
12-11 16:38:53.953: E/AudioTrack(25701): AudioFlinger could not create track, status: -22 12-11 16:38:53.953: E/SoundPool(25701): Error creating AudioTrack 12-11 16:38:53.993: D/dalvikvm(25701): GC_EXPLICIT freed 947K, 14% free 14414K/16672K, paused 2ms+4ms, total 96ms 12-11 16:39:16.363: E/AudioTrack(25701): AudioFlinger could not create track, status: -22 12-11 16:39:16.363: E/SoundPool(25701): Error creating AudioTrack 12-11 16:39:16.433: D/dalvikvm(25701): GC_FOR_ALLOC freed 2120K, 15% free 14418K/16848K, paused 47ms, total 47ms
By the way, I'm using BodyEditor library for Box2D program and rendering, a physics engine.