Necessary if we wish to have GPU objects in our base class, as otherwise the device will be released before the objects.