Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tools & Utilities

Reply
 
LinkBack Thread Tools Display Modes
Old 07-21-2011, 10:33 PM   #1 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 23
imtz is on a distinguished road
Default XCode 4.1 - Change in automatic files?

I noticed that when creating a new 'View-based application' the viewController.h file now looks like this

Code:
// Created by, Copyright, etc.

#import <UIKit/UIKit.h>

@interface test1ViewController : UIViewController

@end
and no longer has the {} by default. Also, the .m file no longer has the dealloc method by default. Is this a bug, is it on purpose? If this is on purpose, what is the reason for it?

Last edited by imtz; 07-21-2011 at 11:06 PM.
imtz is offline   Reply With Quote
Old 07-29-2011, 03:48 PM   #2 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 1
ChadCottle is on a distinguished road
Default

Quote:
Originally Posted by imtz View Post
I noticed that when creating a new 'View-based application' the viewController.h file now looks like this

Code:
// Created by, Copyright, etc.

#import <UIKit/UIKit.h>

@interface test1ViewController : UIViewController

@end
and no longer has the {} by default. Also, the .m file no longer has the dealloc method by default. Is this a bug, is it on purpose? If this is on purpose, what is the reason for it?
I noticed the same thing. My application started crashing when I moved from one view controller back to the original view controller. I banged my head on it for five hours before I decided to build my 3-file set from scratch and copy over my code. That's when I noticed what you posted about the missing { characters and the missing dealloc method.

In my newly re-created h and m files, I didn't include my dealloc during testing and now I have no more crashing.

The moment I re-add the dealloc method, though, it starts crashing again. So I moved everything from dealloc into my viewDidUnload method since that's what instruments told me when I checked for the memory leaks I knew I was going to have. Now it cleanly unloads my memory usage, no more leaks and no more crashing.
ChadCottle is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 406
11 members and 395 guests
AppleDev, chemistry, Gi-lo, ipodphone, mistergreen2011, pipposanta, QuantumDoja, Retouchable, RobTaku, SLIC
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,129
Posts: 402,925
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:30 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0