release

[objective-c] why shouldn't I release this string?

Look at the following method: -(void)updateProfile:(Profile *)profile WithJSON:(NSString *)JSON; { SBJSON *parser = [[SBJSON alloc] init]; NSDictionary *object = [parser objectWithString:JSON error:nil]; NSNumberFormatter *nf = [[NSNumberFormatter alloc] init]; [nf setPositiveFormat:@"#,##0"]; profile.displayName =...

Releasing local variables before return?

In objective-c, I understand that you need to release anything you init/retain/copy. Do I need to do that before a return statement? I'm wanting to understand calling release explicitly and not use autorelease. -(void) someMethod { AnotherClass* ac = [[AnotherClass alloc] init]; if([ac somethingHappens]){ // Do I need to relea...

How can't I occur an Error when using NSURLConnection ?

a scenario is below. I made two Controllers, A tableViewController, B viewController and C ScrollView. A tableViewController has cell that is entering to B viewController. and B viewController has C scrollView that is B's front View. C scrollView has object of NSURLConnection. and this functioned to download an image. ( A -> pushViewC...

[Iphone] Is "create then release then re-create then release" better than "create then use twice then release" ?

Hey guys, Let's put you this in context ;) Suppose you have a tableview that you can refresh. Would you keep the activityAnimator in memory or re-create it every time you click on refresh ... ? I know this could sound pretty obvious, it seems pretty clear that in the first case you get to speed up your app and in the other case you ge...

iphone basic release question

Hi, When i add a new subview, i cant immediately release the controller after displaying. How should i release this viewController? I was thinking about using a property for the viewController, and use delegation to notify for removing the view and releasing it? Is this the best way to do it? or should i do something with autorelease?...

Flex Webservice in swf question

I'm trying to use for getting infomation from an WSDL file online. I have no problem running and testing in my FLEX 3 builder. However, After I export release build into SWF file. The program doesn't work even running local. IE/firefox said "transferring data from http://www.webservicex.net" on the status bar and doesn't response. Thi...

Windows Workflow Foundation 4 (WF4) Persistence

I've been working with Visual Studio 2010 Beta-2 to get some advanced learning on WF4. Everything was going fine until today, when I un-installed Visual Studio 2010 Beta-2, and installed the Visual Studio 2010 Release Candidate. My code is complaining that it can’t find the System.Runtime.Persistence namespace that I am using, and also,...

iphone: applicationWillTerminate not called during a NSURLRequest?

Hi, I am working on an application where the user at some point must wait for a proper response from a webservice. This might take some time, because it requires a manual confirmation from the webservice. Because of this, the timeoutInterval on the request is set very high to prevent it from terminating too early. The problem comes w...

[release] strategy for two mutually exclusive UIViews (iPhone)

Hi I have been doing spring cleaning in my app. I noticed something strange, that, when I tried to correct it, completely crashes my app. There are two "paths" in my app; either you are in the "A" part of it or you are in the "B" part. From the "A" part you can go to the "B" part and the other way around. I designed it so that the app ...

Release an App on a new account

So I have this App in the store, and I would like to release it on another account, newly created. Is anything like a transfer possible? Or would I have to remove it, and re-release it? Would that result in problems with Apple? Does anyone have any infos about this issue? ...

Obj-C: A reference or a copy?

Is the product item a copy, or just a reference to the object in the NSArray? Does it need to be released? Considering there is no alloc, I assume there is no need for release, correct? ProductItem *item = [appDelegate.productTextList objectAtIndex:[indexPath row]]; ...

I have a question about NSInteger release.

DetailViewController.h @interface DetailViewController : UIViewController { NSInteger getInteger; NSNumber *getNumber; } @property (nonatomic, retain) NSNumber *getNumber; @property (nonatomic, retain) NSInteger getInteger => Doesn't work with warning. hi, guys. I have a question about NSInteger. I know that NSNumber is abl...

release and retain

Let's say I do the following (foo starts out as some object): [foo release]; // STUFF with foo [foo retain]; As long as I'm not re-assigning foo, at the end of this I'll still have the same foo, right? I'm not risking losing foo during the //STUFF am I? I guess I'm making sure that my understanding of release is correct. If I rel...

Popping View crashes Application at [super dealloc]

I have a tableView:didSelectRowAtIndexPath: where I create a ViewController-Instance each time an item is selected. Sometimes it works fine for a long time, sometimes it crashes with a EXC_BAD_ACCESS very quickly. The debugger blames the line [super dealloc]; in the QuestionDetailViewController. Why? I log the QuestionDetailViewControll...

How to release a simple program

What is the best practice for releasing a simple software? Suppose I created a very small simple and useful program or a tool and would like to share it with everyone by uploading it to my web-site. Do I need a license and which one? (I read http://www.gnu.org/ and http://www.fsf.org/ but still cannot decide - there are too many of the...

Is there a recommended strategy for releasing a beta version of an application to a limited number of users through the Android Market?

I would like to distribute a beta version of my application to a small group of users. Ideally this would be done through the market to make it easier for the beta testers. Is there a way to restrict an app's presence in the market? The only solutions I could come up with were: 1 - Have users download the .adk from the web and inst...

How to build a java applet?

Most of the tutorials around explain how to create a java applet: create a .java file with a class, compile it with javac, put the .class somewhere, add a proper tag in the html. However, I'm not able to find anything about the best practices to build and release a complex applet, made of multiple classes and with additional libraries....

C# debug vs release performance

Hi. I've encountered in the following paragraph: “Debug vs Release setting in the IDE when you compile your code in Visual Studio makes almost no difference to performance… the generated code is almost the same. The C# compiler doesn’t really do any optimisation. The C# compiler just spits out IL… and at the runtime it’s the JITer that...

C++ defines for a 'better' Release mode build in VS

I currently use the following preprocessor defines, and various optimization settings: WIN32_LEAN_AND_MEAN VC_EXTRALEAN NOMINMAX _CRT_SECURE_NO_WARNINGS _SCL_SECURE_NO_WARNINGS _SECURE_SCL=0 _HAS_ITERATOR_DEBUGGING=0 My question is what other things do fellow SOers use, add, define, in order to get a Release Mode build from VS C++ ...

What's your release process for your commercial application?

If you are developing a commercial desktop application, what's your release process? Sample process: Develop it: Patch bugs, add features, etc. Feature Freeze (do not fix, add anything unless it's absolutely required) Test it If everything is OK release it, if it's not fix it, test it, release it I think the most crucial question is...