@JRubyMethod(name = "free") public final IRubyObject free(ThreadContext context) { ((AllocatedDirectMemoryIO) getMemoryIO()).free(); // Replace memory object with one that throws an exception on any access setMemoryIO(new FreedMemoryIO(context.runtime)); return context.nil; }
@JRubyMethod(name = "autorelease?") public final IRubyObject autorelease_p(ThreadContext context) { return context.runtime.newBoolean(((AllocatedDirectMemoryIO) getMemoryIO()).isAutoRelease()); } }
@JRubyMethod(name = "autorelease=", required = 1) public final IRubyObject autorelease(ThreadContext context, IRubyObject release) { ((AllocatedDirectMemoryIO) getMemoryIO()).setAutoRelease(release.isTrue()); return context.nil; }
@JRubyMethod(name = "free") public final IRubyObject free(ThreadContext context) { ((AllocatedDirectMemoryIO) getMemoryIO()).free(); // Replace memory object with one that throws an exception on any access setMemoryIO(new FreedMemoryIO(context.runtime)); return context.nil; }
@JRubyMethod(name = "autorelease=", required = 1) public final IRubyObject autorelease(ThreadContext context, IRubyObject release) { ((AllocatedDirectMemoryIO) getMemoryIO()).setAutoRelease(release.isTrue()); return context.nil; }
@JRubyMethod(name = "autorelease?") public final IRubyObject autorelease_p(ThreadContext context) { return context.runtime.newBoolean(((AllocatedDirectMemoryIO) getMemoryIO()).isAutoRelease()); } }
@JRubyMethod(name = "free") public final IRubyObject free(ThreadContext context) { ((AllocatedDirectMemoryIO) getMemoryIO()).free(); // Replace memory object with one that throws an exception on any access setMemoryIO(new FreedMemoryIO(context.runtime)); return context.runtime.getNil(); }
@JRubyMethod(name = "autorelease=", required = 1) public final IRubyObject autorelease(ThreadContext context, IRubyObject release) { ((AllocatedDirectMemoryIO) getMemoryIO()).setAutoRelease(release.isTrue()); return context.runtime.getNil(); }
@JRubyMethod(name = "autorelease?") public final IRubyObject autorelease_p(ThreadContext context) { return context.runtime.newBoolean(((AllocatedDirectMemoryIO) getMemoryIO()).isAutoRelease()); } }
@JRubyMethod(name = "free") public final IRubyObject free(ThreadContext context) { ((AllocatedDirectMemoryIO) getMemoryIO()).free(); // Replace memory object with one that throws an exception on any access setMemoryIO(new FreedMemoryIO(context.runtime)); return context.runtime.getNil(); }
@JRubyMethod(name = "autorelease=", required = 1) public final IRubyObject autorelease(ThreadContext context, IRubyObject release) { ((AllocatedDirectMemoryIO) getMemoryIO()).setAutoRelease(release.isTrue()); return context.runtime.getNil(); }
@JRubyMethod(name = "autorelease?") public final IRubyObject autorelease_p(ThreadContext context) { return context.runtime.newBoolean(((AllocatedDirectMemoryIO) getMemoryIO()).isAutoRelease()); } }
@JRubyMethod(name = "free") public final IRubyObject free(ThreadContext context) { if (getMemoryIO() instanceof AllocatedDirectMemoryIO) { ((AllocatedDirectMemoryIO) getMemoryIO()).free(); } else { throw context.runtime.newRuntimeError("cannot free non-allocated function"); } // Replace memory object with one that throws an exception on any access setMemoryIO(new FreedMemoryIO(context.runtime)); return context.nil; }
@JRubyMethod(name = "autorelease=", required = 1) public final IRubyObject autorelease(ThreadContext context, IRubyObject release) { if (autorelease != release.isTrue() && getMemoryIO() instanceof AllocatedDirectMemoryIO) { ((AllocatedDirectMemoryIO) getMemoryIO()).setAutoRelease(autorelease = release.isTrue()); } return context.nil; }
@JRubyMethod(name = "free") public final IRubyObject free(ThreadContext context) { if (getMemoryIO() instanceof AllocatedDirectMemoryIO) { ((AllocatedDirectMemoryIO) getMemoryIO()).free(); } else { throw context.runtime.newRuntimeError("cannot free non-allocated function"); } // Replace memory object with one that throws an exception on any access setMemoryIO(new FreedMemoryIO(context.runtime)); return context.nil; }
@JRubyMethod(name = "autorelease=", required = 1) public final IRubyObject autorelease(ThreadContext context, IRubyObject release) { if (autorelease != release.isTrue() && getMemoryIO() instanceof AllocatedDirectMemoryIO) { ((AllocatedDirectMemoryIO) getMemoryIO()).setAutoRelease(autorelease = release.isTrue()); } return context.nil; }
@JRubyMethod(name = "free") public final IRubyObject free(ThreadContext context) { if (getMemoryIO() instanceof AllocatedDirectMemoryIO) { ((AllocatedDirectMemoryIO) getMemoryIO()).free(); } else { throw context.runtime.newRuntimeError("cannot free non-allocated function"); } // Replace memory object with one that throws an exception on any access setMemoryIO(new FreedMemoryIO(context.runtime)); return context.runtime.getNil(); }
@JRubyMethod(name = "autorelease=", required = 1) public final IRubyObject autorelease(ThreadContext context, IRubyObject release) { if (autorelease != release.isTrue() && getMemoryIO() instanceof AllocatedDirectMemoryIO) { ((AllocatedDirectMemoryIO) getMemoryIO()).setAutoRelease(autorelease = release.isTrue()); } return context.runtime.getNil(); }
@JRubyMethod(name = "free") public final IRubyObject free(ThreadContext context) { if (getMemoryIO() instanceof AllocatedDirectMemoryIO) { ((AllocatedDirectMemoryIO) getMemoryIO()).free(); } else { throw context.runtime.newRuntimeError("cannot free non-allocated function"); } // Replace memory object with one that throws an exception on any access setMemoryIO(new FreedMemoryIO(context.runtime)); return context.runtime.getNil(); }
@JRubyMethod(name = "autorelease=", required = 1) public final IRubyObject autorelease(ThreadContext context, IRubyObject release) { if (autorelease != release.isTrue() && getMemoryIO() instanceof AllocatedDirectMemoryIO) { ((AllocatedDirectMemoryIO) getMemoryIO()).setAutoRelease(autorelease = release.isTrue()); } return context.runtime.getNil(); }