Class VariablePool
java.lang.Object
org.wpilib.math.autodiff.VariablePool
- All Implemented Interfaces:
AutoCloseable
Cleans up implicitly allocated Variables via try-with-resources.
This implements a stack of Variable pools containing a default global pool. The user can create additional pools via try-with-resources. Variable and VariableMatrix instances will register themselves with the latest pool.
It's strongly recommended to only instantiate this class via try-with-resources so the close() methods are always called in the correct order (i.e., nested scopes).
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
VariablePool
public VariablePool()Default constructor.
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable
-
register
-