This is a memory allocation issue that I\'ve never really understood.
void unleashMonkeyFish() { MonkeyFish * monkey_fish = new MonkeyFish(); std::string
This is precisely the problem that reference counting is meant to solve. You could use the Boost shared_ptr<> to reference the string object in a way such that it lives at least as long as every pointer at it.
Personally I never trust it, though, preferring to be explicit about the allocation and lifespan of all my objects. litb's solution is preferable.