Hola,
¿De dónde sale "toolbar1"? ¿Dónde declaras esa variable?
En todo caso, echa un vistazo a la ayuda del método "Destroy" de "TObject":
Cita:
Do not call Destroy directly. Call Free instead. Free verifies that the object reference is not nil before calling Destroy.
(...)
Destroy should be implemented so that it calls Free on all subobjects created within the object’s constructor (that is, allocated by the constructor). Unlike Destroy, Free provides a safeguard when destroying objects that are nil.
|