ObjCBlock.fromFunction(closure)
indefinitely hangs on to closures and therefore leaks memory
#225
Labels
ObjCBlock.fromFunction(closure)
indefinitely hangs on to closures and therefore leaks memory
#225
Right now the
ObjCBlock.fromFunction(closure)
is implemented as follows:This registers the closure in a global map where it's never removed from again - effectively creating a memory leak. Since the closures that are passed to
ObjCBlock.fromFunction(closure)
may hang on to non trivial amounts of memory, this seems like a big problem.If memory is managed manually, it would mean calling
ObjCBlock.release()
should also release the closure from the map.The text was updated successfully, but these errors were encountered: