Update entity.cpp

actually and allocated