home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20156 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  1.0 KB

  1. Path: sparky!uunet!gatech!destroyer!cs.ubc.ca!unixg.ubc.ca!guxu
  2. From: guxu@physics.ubc.ca (Guang Xu)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Using new() and delete() for direct class
  5. Date: 21 Dec 1992 22:38:11 GMT
  6. Organization: The University of British Columbia
  7. Lines: 13
  8. Distribution: world
  9. Message-ID: <1h5h0jINNd1@iskut.ucs.ubc.ca>
  10. NNTP-Posting-Host: physics.ubc.ca
  11.  
  12.  I have been using new()/delete() to creat/delete objects which
  13.  are defined as direct class for a while and it never complained
  14.  so far. All a sudden I noticed the following in the Think C User's
  15.  Manual:
  16.  "The new() and delete() functions are not implemented for direct
  17.  classes. You're responsible for allocating space for the
  18.  object yourself. ...". I did notice that deleting a object within 
  19.  it's method ( delete(this)) causes crash, but it's ok if I delete
  20.  the object from outside using delete(theObject). Can anyone explain
  21.  this phenomena?
  22.  After all, are there any existing functions to creat/delete object
  23.  defined as direct class? 
  24.   
  25.