Generated C++ devices have an updateUsageState() method that is meant to be called after an allocation or deallocation. The default Device_impl::updateUsageState() is not declared as virtual (Device_impl.h#149), so allocateCapacity() and deallocateCapacity() only call the empty base version, not the derived class implementation. As a result, custom non-FEI devices have to either override allocateCapacity() and deallocateCapacity() or otherwise change the device state.
This does not affect C++ FEI devices, which have a different, non-empty (and virtual) updateUsageState().