ObjectStore C++ API Reference

::operator delete()

Persistent storage can be reclaimed using the delete operator, just as it would be used for transient objects.

When a persistent object is deleted with operator delete(), the database in which it is to be stored must be opened by the process performing the deletion, and this process must have a transaction in progress.

This function can also be used to reclaim transient storage. See objectstore::set_transient_delete_function().

On the OS/2 operating system, ObjectStore also supports ::operator delete[]() for persistent storage, which works just like ::operator delete().

Required header files
All ObjectStore programs must include the header file <ostore/ostore.hh>.

void ::operator delete()

Deletes the specified object from storage. The argument must point to the beginning of an object's storage. If it points to the middle of an object, the exception err_invalid_deletion is signaled. This might happen, for example, if the argument points to the fifth element of a persistent array, or if the argument has been cast from a D* to a B*, where class D is derived directly from class B and some other class.



[previous] [next]

Copyright © 1997 Object Design, Inc. All rights reserved.

Updated: 03/31/98 17:30:04