allocRectangle method
Allocate single Rectangle
Returns a pointer to the allocated memory.
Implementation
Pointer<Rectangle> allocRectangle() {
if (_isDisposed) {
throw StateError('Cannot allocate memory in disposed scope');
}
final ptr = calloc<Rectangle>();
_allocations.add(ptr);
return ptr;
}