fixed pointer handling to ESPIlwisObject (shared_ptr) WORKING example