Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
177 views

Swift: deallocate modally presented view controller

I have a modally presented SearchviewController that contains a UISearchController. When swiping down it gets deallocated, but only if the searchControllers searchBar is not in editing mode. Only if I ...
alju2404's user avatar
3 votes
2 answers
4k views

When is `deinit` exactly called? (in Swift)

When is deinit exactly called? Is it like C++ guaranteed to be called when last reference gets out of scope (by return, throw or exit)? Or is Swift using Garbage-Collector?
Top-Master's user avatar
  • 8,886
0 votes
2 answers
100 views

Speed up segues and Unwind segues

I am trying to speed up segues and unwind segues between view controllers. If I am doing anything fundamentally wrong please let me know or if I need to upload more code for context. Here is a ...
mick1996's user avatar
  • 606
0 votes
0 answers
74 views

Memory is not being relased when I go back and forth between view controllers

I have an app with a main view controller that has a uitableview that has a user listed in each cell. Each cell has a profile pic. Tapping the profile pic goes to that users profile page using ...
Ben Akin's user avatar
  • 167
0 votes
4 answers
269 views

ViewController Doesn't Deinited

I have a FakeSplashController which does; ) Do a network request and wait for Its Result ) Show an animation then open SeconViewController Something blocks this ViewController to be deallocated and ...
Emre Önder's user avatar
  • 2,537
0 votes
1 answer
437 views

[UIActivityIndicatorView release]: message sent to deallocated instance in swift-3

I'm using an activity indicator in mine api calling mechanism, while hiding the HUD the code gets crash and shooting an error of "[UIActivityIndicatorView release]: message sent to deallocated ...
Joe's user avatar
  • 879
6 votes
2 answers
9k views

NSKeyedArchiver.archivedData does not work in Swift 3 iOS

When try to encode my custom object in iOS swift get this error from Xcode 8.3 unrecognized selector sent to instance 0x60800166fe80 *** -[NSKeyedArchiver dealloc]: warning: NSKeyedArchiver ...
reza_khalafi's user avatar
  • 6,554
1 vote
0 answers
463 views

Swift iOS -How to remove a view controller of a segmentControl from memory?

I have a segmentControl with 2 indexes. It is inside a parent view controller. The parent view controller has 2 containerViews that each have an embedded viewController. parentVC | ...
Lance Samaria's user avatar
0 votes
1 answer
2k views

How can I deallocate all references elements from an array?

I'm trying to create a retrying mechanism for our network calls. I have created 2 classes. One a retry Class and another a Manager in case I wanted I can cancel all classes. class Retry { var url:...
mfaani's user avatar
  • 36.6k
0 votes
1 answer
210 views

Why this viewController property doesn't prevent the object from being deallocated?

Please consider the following code: class Module { let viewController = ExampleViewControler() deinit { print("deinit") } } class ExampleViewControler: UIViewController {} @...
Davide's user avatar
  • 784
3 votes
1 answer
2k views

Strong references and UIView memory issues

I'm dealing with some deallocation issue and perhaps strong or circular referencing that can't figure out. I have three UIViews instantiating like below: There is one main ViewController which I ...
TheBen's user avatar
  • 3,520
1 vote
0 answers
99 views

Object deallocates when called multiple times

I pushing a viewcontroller onto the navigation stack. When I press the back button and re-enter the same page multiple times, the object in the initializer gets de-allocated. Here is my code: init(...
Siddharthan Asokan's user avatar
2 votes
1 answer
1k views

deinit not called inside uiviewcontroller after pressing back - Swift

I am trying to dealloc / destroy an NSTimer after a user clicks back, but the deinit{...} inside the uiviewcontroller never gets called.
Tim Nuwin's user avatar
  • 2,897
0 votes
1 answer
286 views

Swift: UIViewController doesn't auto deiniting

I added to my UIViewController the code below: deinit { print("DEINIT") } And then i used the code below: let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil) let ...
Dror Chen's user avatar
1 vote
3 answers
77 views

Im confused on how can I manipulate the properties inside an instance when it gets deinitialized?

I have this from either the Apple documentation or the swift book When an instance gets deinitialized, you still have access to the properties inside the instance and can manipulate them as ...
Ali 's user avatar
  • 515

15 30 50 per page