Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
40 views

Why is a CALayer retained after I stop referencing it?

I've the impression that my CALayer is retained after being added as a sublayer until the end execution block, instead of until I stop referencing it. The parent UIView is however released as soon as ...
Guig's user avatar
  • 10.5k
1 vote
0 answers
27 views

Memory allocation in swift [duplicate]

In swift, based on Apple's documentation reference types are stored on heap and value types on stack, but if a class definition has a struct variable for example String, where will that be stored? ...
Daksh Sabharwal's user avatar
2 votes
2 answers
117 views

EXC_BREAKPOINT on NSFetchedResultsController.performFetch() because of -[CFString isNSString__]: message sent to deallocated instance

I'm running into a repeatable crash when calling -performFetch on my NSFetchedResultsController in what SEEMS like a data-related crash: NSFetchedResultsController *aFetchedResultsController = ...
Kenny Wyland's user avatar
  • 21.9k
2 votes
0 answers
588 views

Memory issues on iOS

I'm currently working on optimizing my app. When I'm monitoring the app's memory in DevTool it's showing around 20MB of memory usage. However, when I'm running the same app via XCode, it's showing ...
Jérôme's user avatar
  • 413
2 votes
0 answers
348 views

google_maps_flutter - Map is using all available memory

I'm currently porting a native iOS to Flutter. I noticed that my widget containing the map is consuming a lot of memory over 500 MB. Compared to my native iOS app, it's using x5 more memory. I don't ...
Jérôme's user avatar
  • 413
2 votes
2 answers
1k views

Swift Memory Leaks with UIDiffableDataSource, CFString, Malloc Blocks, and others

I've been writing an application for a couple months now and just started checking for memory leaks - it turns out I have a lot of them - 25 unique types (purple exclamation point) and over 500 total ...
18indypeyton18's user avatar
2 votes
1 answer
228 views

FileHandle don't free memory in iOS

I'll send large file to server. The file will be separated to chunks. I receive high memory consumption when I call FileHandle.readData(ofLength:). Memory for chunk don't deallocate, and after some ...
Pavel Sinkevich's user avatar
0 votes
1 answer
91 views

iOS Swift: NSMutableString vs [Character] which is better for known size?

I'm doing some text processing, involving converting a number of characters into strings. Input is a long sequence of Character and output is a number of strings created from the Character sequence ...
Heuristic's user avatar
  • 5,351
4 votes
2 answers
1k views

Could a guard let `self` = self inside a closure that uses [weak self] cause a crash if the object they reference becomes deallocated?

I've looked at some comments to questions on stackoverflow about using [weak self] and [unowned self]. I need to be sure I understand correctly. I am using the latest Xcode - Xcode 13.4, the latest ...
daniel's user avatar
  • 994
0 votes
1 answer
223 views

When static object auto release in singleton pattern in iOS?

I have a question about singleton using static memory. I usually use this pattern to hold my temporary data in my APP. When I leave the APP for a long time, is it possible that the singletion memory ...
Beginnerrrrrr's user avatar
-1 votes
1 answer
59 views

Does closure create a strong reference to an object that is created inside closure scope?

In this example, will vm and targetVC get deinitialized? will it cause a memory leak? loginModule.checkbox.checkboxAction = { [unowned self] in let vm = HomeViewModel() let targetVC = ...
Sevenfortyseven's user avatar
1 vote
1 answer
2k views

Do we need to explicitly use capture list for weak variables in swift closure?

My understanding for closure was, it will capture all directly referenced objects strongly irrespective of whether the object variable was declared weak or strong outside the closure and, if we want ...
Vishal Singh's user avatar
  • 4,490
1 vote
0 answers
472 views

Remove UIViewController from UIView and release memory

I'm adding UIViewController in another UIView using: self.addChild(vc) self.view.addSubview(vc.view) vc.didMove(toParent: self) and removing that UIViewController by: for childVC in self.children { ...
Deep Gandhi's user avatar
0 votes
1 answer
787 views

Memory Problem with specific ViewController in Swift 5

I need some help with this problem. I have this basic Scheme HomeController TripNavigation (view controller parent) Step1 (view controller child) Step2 (view controller child) When i tap 10 times ...
nacho1111's user avatar
0 votes
3 answers
863 views

How to reduce MSAA memory usage?

Here is working on rendering with OpenGL ES on iOS. To get a better image quality, we adopt MSAA, ie. Multisample anti-aliasing, which use 4 times larger FBO. For example, with 1080P resolution, a ...
heLomaN's user avatar
  • 1,824

15 30 50 per page
1
2 3 4 5
171