When is it necessary to use a handle?

When designing an object, the user is faced with the choice of manipulating that object by value, or by handle. The criterion for choosing one solution or the other is the following:

Is your object one which may have a long life-time within the application and to which you want to make multiple references?

In this case, unquestionably the choice is to manipulate this object with a handle. The memory for the object will be allocated on the heap. The handle which points to that memory is a light object which can be rapidly passed in argument. This avoids the penalty of copying a large object. On the other hand, is your object one which will have a limited lifetime, for example, a object limited to the scope of a single algorithm? In this case, independent of the size of the object, the choice is clearly to manipulate this object by value. The Reason being that this object is allocated on the stack and the allocation and de-allocation of memory is extremely rapid - avoiding the implicit calls to 'new' and 'delete' occasioned by allocation on the heap.

In the case of an object which, you are certain, will only be created once during the lifetime of an application and which will exist throughout that lifetime, then the best choice may be a class manipulated by handle or value which you will declare as a global variable.