Update objects.cpp to use member function device->associateObject
It is the responsibility of objects to remember their owning device