ClipperPool
clipper.ClipperPool (Class)
Object pooling manager for Clipper2.
Use trackObjects() before clipper operations and recycleObjects() after
to reuse allocated objects and reduce GC pressure.
Example:
ClipperPool.trackObjects();
var result = Clipper.inflatePaths(paths, 10, JoinType.Miter, EndType.Polygon);
// Copy needed data from result
ClipperPool.recycleObjects();
Static Members
trackObjects(): VoidStart tracking all created objects for later recycling. Call this before performing clipper operations.
recycleObjects(): VoidRecycle all tracked objects back to their pools. Call this after you've copied the needed data from clipper results. Objects become invalid after this call.
clearPools(): VoidClear all pools and tracking state. Useful for testing or when you want to release pooled memory.
getPoint64PoolSize(): Int| Returns |
|---|
| Int |
getPointDPoolSize(): Int| Returns |
|---|
| Int |
getOutPtPoolSize(): Int| Returns |
|---|
| Int |
getActivePoolSize(): Int| Returns |
|---|
| Int |
getVertexPoolSize(): Int| Returns |
|---|
| Int |
getLocalMinimaPoolSize(): Int| Returns |
|---|
| Int |
getIntersectNodePoolSize(): Int| Returns |
|---|
| Int |
getHorzSegmentPoolSize(): Int| Returns |
|---|
| Int |
getHorzJoinPoolSize(): Int| Returns |
|---|
| Int |
getOutRecPoolSize(): Int| Returns |
|---|
| Int |
isTracking(): Bool| Returns |
|---|
| Bool |
acquirePoint64Impl(): Null<Point64Impl>| Returns |
|---|
| Null<Point64Impl> |
acquirePointDImpl(): Null<PointDImpl>| Returns |
|---|
| Null<PointDImpl> |
| Returns |
|---|
| Null<OutPt> |
| Returns |
|---|
| Null<Active> |
| Returns |
|---|
| Null<Vertex> |
acquireLocalMinima(): Null<LocalMinima>| Returns |
|---|
| Null<LocalMinima> |
acquireIntersectNode(): Null<IntersectNode>| Returns |
|---|
| Null<IntersectNode> |
acquireHorzSegment(): Null<HorzSegment>| Returns |
|---|
| Null<HorzSegment> |
| Returns |
|---|
| Null<HorzJoin> |
| Returns |
|---|
| Null<OutRec> |
trackPoint64(impl: Point64Impl): Void| Name | Type |
|---|---|
impl |
Point64Impl |
trackPointD(impl: PointDImpl): Void| Name | Type |
|---|---|
impl |
PointDImpl |
| Name | Type |
|---|---|
op |
OutPt |
| Name | Type |
|---|---|
a |
Active |
| Name | Type |
|---|---|
v |
Vertex |
trackLocalMinima(lm: LocalMinima): Void| Name | Type |
|---|---|
lm |
LocalMinima |
trackIntersectNode(node: IntersectNode): Void| Name | Type |
|---|---|
node |
IntersectNode |
trackHorzSegment(hs: HorzSegment): Void| Name | Type |
|---|---|
hs |
HorzSegment |
| Name | Type |
|---|---|
hj |
HorzJoin |
| Name | Type |
|---|---|
or |
OutRec |
Private Members
point64Pool: Array<Point64Impl>pointDPool: Array<PointDImpl>localMinimaPool: Array<LocalMinima>intersectNodePool: Array<IntersectNode>horzSegmentPool: Array<HorzSegment>trackingEnabled: BooltrackedPoint64: Array<Point64Impl>trackedPointD: Array<PointDImpl>trackedLocalMinima: Array<LocalMinima>trackedIntersectNode: Array<IntersectNode>trackedHorzSegment: Array<HorzSegment>