Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ How does the BeOS handle memory allocation and de-

Media Vault

Software Library

Restoration Projects

Artifacts Sought

How does the BeOS handle memory allocation and de-

  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 ©1998 Be, Inc. Be is a registered trademark, and BeOS, BeBox, BeWare, GeekPort, the Be logo and the BeOS logo are trademarks of Be, Inc. All other trademarks mentioned are the property of their respective owners.
Icons used herein are the property of Be Inc. All rights reserved.
Comments about this site? Please write us at webmaster@be.com.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026