Heap dump of the JVM

I have time to work on a reproduction project in the next couple of days. I will let you know when it is done.

I have been letting Nat/J handle memory management since you clarified things in: Working with iOS Core types - #3 by kisg

I never call an unsafe method in my code. But I do need to explicitly manage objects returned by Core Graphics functions that contain Create, Copy or Alloc in the name, right? For example:

val bitmap = CGBitmapContextCreate(...)
try {
    ..
} finally {
    CGContextRelease(bitmap)
}

Or are these methods using the alloc().init() allocation method underneath and will Nat/J handle it?

1 Like