comp.lang.ada
 help / color / mirror / Atom feed
From: brennanw@pond.com (William  C Brennan)
Subject: Mac memory allocation: NewPtr or Ada's "new"
Date: 1997/03/16
Date: 1997-03-16T00:00:00+00:00	[thread overview]
Message-ID: <brennanw-1603971254020001@indian-6.vf.pond.com> (raw)


I'm learning to do Mac programming using GNAT under CodeBuilder, 
and I'm a little confused about allocating memory from the heap.
Perhaps someone can help...

I have two Mac programming texts, and both of them tell me that
when I want to allocate memory from the heap, I should call the
NewPtr function, which seems to be functionally equivalent to the
Ada "new" allocator.  I'd prefer to use the "new" allocator because
it's not tied to an OS, but I would like to understand any
subtle differences which aren't apparent on the surface.

Is there a operational difference between calling the MacOS NewPtr 
and using Ada's "new" allocator?  How is "new" implemented for
GNAT under MacOS?  

Thanks!

--bill




             reply	other threads:[~1997-03-16  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-16  0:00 William  C Brennan [this message]
1997-03-16  0:00 ` Mac memory allocation: NewPtr or Ada's "new" Robert Dewar
1997-03-17  0:00 ` jim hopper
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox