e-Picture

Be Developers:
Put your banner here!

 cubeprefsicon graphic [Bar]


Developing for BeOS
BeOS Internals

 

With an object-oriented operating system, memory allocation and who is responsible for cleanup can get complicated. How does the BeOS handle this?

Top Up << >>
Developing for BeOS:
BeOS Internals
FAQ Number:
FAQ-0130
Last Modified:
8/28/98
Keywords:
BeOS, Developing, Internals, program, memory, allocate, resource
We try, whenever possible, to allow the developer to both allocate and deallocate memory in pairs. We strive not to have any unbalanced memory allocation or deallocation. So, if you allocate it, you release it and if you're passed a pointer to memory you haven't allocated then you should not release it.

Of course, there are a couple of exceptions to this rule which we tried to avoid but found difficult. Those are specifically called out in The Be Book, the documentation of the BeOS:

http://www.be.com/documentation/be_book/

Finally, when a program exits, all of its resources are freed up by the kernel (open files are closed, memory freed, semaphores and ports deleted, etc.), though it is better when you do this yourself...


<< How fast can BMessages be sent between applications?  Can I use Berkeley sockets?  >>


Copyright © 1999 by Be, Inc. All rights reserved. Legal information (includes icon usage info).
Comments, questions, or confessions about our site? Please write the Webmaster.