TAliasTo is a concrete class for a safe pointer which points to an object. If a TAliasTo wrapper is copied, the pointer is copied as well. In the example:
TA object;
TAliasTo<TA> a1 = &object;
TAliasTo<TA> a2 = a1;
NOw a1 and a2 both point to the same object.
TAliasTo is not safe; it should only be used if the object's lifetime is managed by other means (for example, by one of the other wrappers). By convention, the user of a TAliasTo has an alias to an object, but no responsibilities for the lifetime of that object.
Any type may be pointed to by TAliasTo.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.
Generated with WebMaker