autorelease Questions
1
My objective is to create a GitHub action that, when the release.yml file changes, would either update an existing release or create a new release after checking if that release version is new chec...
Alvarado asked 7/5, 2021 at 8:39
13
Solved
I'm programming an application in Objective-C and I'm getting this error:
MyApp(2121,0xb0185000) malloc: *** error for object 0x1068310: double free
*** set a breakpoint in malloc_error_bre...
Enroll asked 9/6, 2009 at 16:49
1
This is what the documentation has to say about accessing a realm using GCD:
"You should use an explicit autorelease pool when accessing a Realm from a dispatch queue."
Documentation
I have used...
Turne asked 19/12, 2016 at 9:9
3
Solved
I am using VSTS Release management to deploy artifacts to IIS websites. I have several Web applications and web services to be deployed. So, i am trying to figure out what sort of tasks that best f...
Lavabo asked 12/5, 2016 at 21:53
3
Solved
I was reading the documentation from apple about memory management when I got to autorelease pool blocks and something got me thinking.
Any object sent an autorelease message inside the autorelea...
Eyebolt asked 24/4, 2013 at 17:28
1
Objective-C/ARC/memory managements questions have been done to death on SO, but this one seems slightly different to the existing ones.
I've been trying to use Objective-C with GNUStep and Clang. ...
Libyan asked 10/11, 2013 at 22:1
1
Solved
I'm trying to debug some ARC code, and it'd be really helpful if i could find out when an object of a certain class is added to the autorelease pool (not when it is actually autoreleased down the t...
Thymus asked 24/10, 2013 at 22:32
4
Solved
I am a new to objective-c, and I know the basic memory management rules like when to retain release autorelease. But I don't know when should I wrap my code into autorelease pool and why?
Auston asked 13/5, 2012 at 16:36
2
Solved
I am carrying out a number of calculations using NSDecimal and am creating each NSDecimal struct using the following technique:
[[NSNumber numberWithFloat:kFloatConstant] decimalValue]
I am usin...
Rome asked 9/1, 2010 at 23:43
1
Possible Duplicate:
Why use Autorelease pool?
All Objective-C starting page opens with a default @autoreleasepool{...} statement under the main function declaration. But what is this ...
Files asked 3/2, 2013 at 20:39
1
Solved
I have a method like this:
- (void)processAThing:(id)thing error:(NSError * __autoreleasing *)error
{
@autoreleasepool {
// Start processing.
// Find some partway through error..
if (error) ...
Appetizing asked 23/1, 2013 at 21:44
6
Solved
Coming up towards the end of developing an iPhone application and I'm wondering just how bad is it to use autorelease when developing for the iphone. I'm faced with some fairly random crashes and, ...
Massimo asked 9/1, 2009 at 20:9
2
Solved
When I return a CFDataRef by
(CFDataRef)MyFunction{
.....
CFDataRef data = CFDataCreate(NULL, buf, bufLen);
free(buf);
return data;
}
There is a memory leak, how to make CFDataRef autorelea...
Viscount asked 21/11, 2011 at 8:10
4
Solved
I still have some unclear understand about release and autorelease. What are the difference between both of them? I have this code. For facebook connection. I crash it sometimes when I go to Facebo...
Windom asked 16/1, 2010 at 6:18
2
My question may sound stupid an all, but I like to know what happens if I mark an autoreleased object as autorelease. Will it be released twice? Or nothing happens? For example:
Obj * obj = [[Obj...
Stempien asked 18/9, 2012 at 23:40
2
Solved
NSString *str = [[[[NSString alloc]init]autorelease]autorelease];
str = @"hii";
NSLog(@"%@",str);
Can any one help me to tell about this code. Autoreleasing the object twice what will happened. ...
Nessim asked 2/7, 2012 at 10:23
4
I am working on a project on iPhone. I am now initiating a new UIViewController from another UIViewController, and then switch between them. Here is my code.
iGreenAppDelegate *delegate = [UIAppli...
Stocktonontees asked 11/6, 2011 at 16:45
3
Solved
I have code similar to this in Objective-C:
SubclassOfNSObject *GlobalVariableThatShouldNeverChange;
@implementation MyClass
+(void) initialize
{
[super initialize];
GlobalVariableThatShouldNe...
Cayuga asked 11/10, 2010 at 21:46
1
Solved
I've noticed that there is a different way in Xcode 4.2 to start the main function:
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil,
NSStringFromC...
Sarge asked 3/1, 2012 at 15:54
2
Solved
By my understanding, when an object is sent an autorelease message, if no autorelease pools exist other than the one in main.m, the object gets placed in the one in main.m. Assuming this is correct...
Jennie asked 18/12, 2011 at 3:55
4
Solved
I'm still trying to understand this piece of code that I found in a project I'm working on where the guy that created it left the company before I could ask.
This is the code:
-(void)releaseMySel...
Saucy asked 16/12, 2011 at 11:11
2
Solved
If I have this code,
+ (MyCustomClass*) myCustomClass
{
return [[[MyCustomClass alloc] init] autorelease];
}
This code guarantees the returning object is autoreleased.
What's the equivalent of ...
Hoagland asked 28/11, 2011 at 6:4
1
Solved
A small program which loads image and logs its size. It is compiled with ARC support, llvm 3.0. I run it on iPod 4.2 and get some funny numbers... The program is compiled in "Release" mode with "-O...
S asked 21/10, 2011 at 0:20
1
Solved
I'm using Objective-C, and I don't know how to create and call a method with out parameters when compiling the code with the ARC compiler.
This is the kind of thing I'm trying to accomplish in non-...
Scutate asked 12/10, 2011 at 12:56
2
Solved
I have a scenario in an iOS application where manipulating a very large NSString instance (an HTTP response, upwards of 11MB) results in multiple large intermediaries being in memory at once, since...
Tyrrell asked 13/9, 2011 at 15:17
1 Next >
© 2022 - 2024 — McMap. All rights reserved.