Hi, how do I handle memory management for todoUid below? Do I have to retain or autorelease it?

I'm using Scripting Bridge to communicate with iCal. Also, this is a sub-routine and todoUid will only be used in the method that calls it.

- (NSString*) saveToiCalTodo: (NSString*) theSummary : (id) theDescription
{
        // Create new iCal todo
iCalTodo* newTodo = [[[iCal classForScriptingClass:@"todo"] alloc] init];
        
        // Add the todo to my iCal calendar
        [[myCalendar todos] addObject:newTodo];
        
        // Set its summary
        [newTodo setSummary:theSummary];
        
        // Store description
        [newTodo setObjectDescription: theDescription];
        
        // Get uid to return
        NSString* todoUid = [newTodo uid];
        
        // Clean up
        [newTodo release];
        newTodo = nil;
        
        return todoUid;
}

Thanks in advance!
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to