In Larch/C++, the traits for objects, and the built-in C++ types
have trait functions that allow you to specify whether
an object is allocated or not.
The trait function for this purpose is named
and it has many overloading for different sorts.
Generally, it takes an object and a state (such as
as an argument.
See section 6.2.2 Allocated and Assigned for the trait functions
that are part of the built-in types.
In addition, Larch/C++ provides syntactic support for asserting
that an object is newly allocated (
and for specifying what objects are considered "trashed" or
potentially deallocated by a function (the trashes-clause
Unless the trashes-clause is used, a function is not allowed
to deallocate objects.
These ideas are discussed in the subsections that follow.
Go to the first, previous, next, last section, table of contents.