ftp.nice.ch/pub/next/developer/objc/EOF/OTC_EOFBetaExamples.1.0.bs.tar.gz#/OTC_EOFBetaExamples_V1.0/NSFoundation/MemoryAllocation/MyObject.m

This is MyObject.m in view mode; [Download] [Up]

/*--------------------------------------------------------------------------
 *
 * 	You may freely copy, distribute, and reuse the code in this example.
 * 	SHL Systemhouse disclaims any warranty of any kind, expressed or  
 *	implied, as to its fitness for any particular use.
 *
 *
 *	MyObject
 *
 *	Inherits From:		NSObject
 *
 *	Conforms To:		None
 *
 *	Declared In:		MyObject.h
 *
 *
 *------------------------------------------------------------------------*/
#import "MyObject.h"
#import <foundation/NSObject.h>
#import <foundation/NSString.h>
#import <foundation/NSUtilities.h>
#import <appkit/Application.h>

#define print_trace [[NXApp delegate] perform: @selector (console:) with:\
[NSString stringWithFormat: @"%s %s\n", [[self description] cString], \
sel_getName(_cmd)]]




@implementation MyObject

- init
{
	[super init];
	print_trace;
	return self;
}


- copy
{
	print_trace;
	return [super copy];
}


- (void) dealloc
{
	print_trace;
	[super dealloc];
}


@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.