2

I have an optional property of my class of type viewController

var vc : UIViewController()?

I later present that view controller as a popover using some custom code.

Upon dismissing the popOver controller I set the variable to nil

vc = nil

But the object is never release (and dealloc method of the viewcontroller is not called)

This worked in objective c but not in swift for me

Is there anything else I have to do in order to force an object to be released in swift (other than setting it to nil)?

MobileMon
  • 8,341
  • 5
  • 56
  • 75

0 Answers0