-
Notifications
You must be signed in to change notification settings - Fork 113
@PooledWeaver
Rafael Pax edited this page Jun 22, 2017
·
21 revisions
Automatically rewrite components so that instances are recycled. This feature helps mitigate garbage collection related freezes and stuttering on the Android platform. It is considered stable.
Processing of @PooledWeaver
annotated components is done at build-time. See bytecode weaving and weave automation for how to configure it.
@PooledWeaver
public class ExampleComponent extends Component {
public float x;
public float y = 2;
public String stringA;
public String stringB = "hi";
public SomeOtherType obj
}
public class ExampleComponent extends PooledComponent {
public float x;
public float y = 2;
public String stringA;
public String stringB = "hi";
public SomeOtherType obj;
@Override
protected void reset() {
x = 0;
y = 2;
stringA = null;
stringB = "hi";
// non-primitive types are left intact (obj)
}
}
- all primitive values
java.lang.String
-
com.artemis.utils.Bag
,com.artemis.utils.IntBag
- all
java.util.List
,java.util.Set
,java.util.Map
- all
com.badlogic.gdx.utils.*Array
,com.badlogic.gdx.utils.*Map
- Overview
- Concepts
- Getting Started
- Using
- More guides
- Plugins
- Game Gallery
- Tools and Frameworks
- API reference