Memory Management issue?
Memory Management issue?
- Subject: Memory Management issue?
- From: Aaron Wallis <email@hidden>
- Date: Sun, 25 Sep 2005 01:06:08 +1000
Hi all,
im having some trouble with some code.
NSString * scriptPath = [[NSString alloc] init];
scriptPath = [[NSBundle mainBundle] pathForResource:
@"someScript" ofType: @"scpt"];
// check to see if the file exists
if ( scriptPath != nil )
{
// create a url for the file
NSURL * scriptURL = [[ NSURL alloc ] init];
scriptURL = [NSURL fileURLWithPath: [NSString
stringWithString:scriptPath]];
// release the path
[ scriptPath release ];
}
Basically, im creating a string to build a path... if I comment the
[scriptPath release]; line the script works 100%, if I leave it there
I get a SIGSEGV 11 error...
im still kinda a newbie at Cocoa so im not to sure if im on the right
track or not...
Any ideas?
Cheers !!!
_/Az.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden