Object types are a deprecated predecessor to class types that do not support constructors and
destructors and do not descend from TObject.
They are supported for backward compatibility only, and usage is not recommended.
Change the object keyword to class:
type
TFoo = object
// ...
end;
type
TFoo = class
// ...
end;
Code that uses the class may need to be changed to use modern class features like
constructors and destructors.