home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / Database / OTC_EOFBetaExamples_V1.0 / NSFoundation / MemoryAllocation / MyObject.m < prev    next >
Encoding:
Text File  |  1994-07-31  |  980 b   |  56 lines

  1. /*--------------------------------------------------------------------------
  2.  *
  3.  *     You may freely copy, distribute, and reuse the code in this example.
  4.  *     SHL Systemhouse disclaims any warranty of any kind, expressed or  
  5.  *    implied, as to its fitness for any particular use.
  6.  *
  7.  *
  8.  *    MyObject
  9.  *
  10.  *    Inherits From:        NSObject
  11.  *
  12.  *    Conforms To:        None
  13.  *
  14.  *    Declared In:        MyObject.h
  15.  *
  16.  *
  17.  *------------------------------------------------------------------------*/
  18. #import "MyObject.h"
  19. #import <foundation/NSObject.h>
  20. #import <foundation/NSString.h>
  21. #import <foundation/NSUtilities.h>
  22. #import <appkit/Application.h>
  23.  
  24. #define print_trace [[NXApp delegate] perform: @selector (console:) with:\
  25. [NSString stringWithFormat: @"%s %s\n", [[self description] cString], \
  26. sel_getName(_cmd)]]
  27.  
  28.  
  29.  
  30.  
  31. @implementation MyObject
  32.  
  33. - init
  34. {
  35.     [super init];
  36.     print_trace;
  37.     return self;
  38. }
  39.  
  40.  
  41. - copy
  42. {
  43.     print_trace;
  44.     return [super copy];
  45. }
  46.  
  47.  
  48. - (void) dealloc
  49. {
  50.     print_trace;
  51.     [super dealloc];
  52. }
  53.  
  54.  
  55. @end
  56.