Memory leak due to BridgeFromObjectiveC

A memory leak using the interface constructor and automatically generated code from Xcode.

Steps to play:

  • Added 8 UIButtons for UIViewControler in storyboard.
  • Using the IBOutlet collection links all UIButtons to the Swfit source file.
  • Done application using tools β†’ Leaks
  • 80 bytes of memory leak were detected.

The responsible frame for this memory leak is static Array._forceBridgeFromObjectiveC (NSArray, result: inout [A]?) β†’ ().

How can I fix forceBridgeFromObjectiveC memory leak?

Xcode: 7.2.1 iOS: 9.2.1

+6
source share

All Articles