org.rococoa.internal
Class AutoreleaseBatcher

java.lang.Object
  extended by org.rococoa.internal.OperationBatcher
      extended by org.rococoa.internal.AutoreleaseBatcher

public class AutoreleaseBatcher
extends OperationBatcher

Used by NSObjectInvocationHandler to make sure that there is an NSAutoreleasePool available when NSObject's are finalized, but not pay the price of creating one per call. Take care, this is tested but unproven code (2009/08).

Author:
duncan

Constructor Summary
AutoreleaseBatcher(int batchSize)
           
 
Method Summary
static AutoreleaseBatcher forThread(int batchSize)
           
protected  void operation()
           
protected  void reset()
           
 
Methods inherited from class org.rococoa.internal.OperationBatcher
close, operate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoreleaseBatcher

public AutoreleaseBatcher(int batchSize)
Method Detail

forThread

public static AutoreleaseBatcher forThread(int batchSize)

operation

protected void operation()
Specified by:
operation in class OperationBatcher

reset

protected void reset()
Specified by:
reset in class OperationBatcher


Copyright © 2009. All Rights Reserved.