AutoReleasable constructor

AutoReleasable()

Implementation

AutoReleasable() {
  if (AutoReleasePool.globalPull != null) {
    AutoReleasePool.globalPull!.addObject(this);
  } else {
    if (!allowCreationWithoutAutorelease) {
      throw Exception(
          "AutoReleasable objects must be created within autorelease");
    }
  }
}