It is not necessary to remove all links of an object before removing the object itself. All links to other objects are removed automatically.
When an object is removed, all object-related data (logging, history) is also removed from the database.