Here's how I can reproduce the memory leak:
- On the home page, I press button A, which calls a method in the view model that creates a
std::string
usingstd.string
as documented here. - Then, I press button B on the home page that opens a modal view.
- Then, instruments detects a leak of 192 bytes, and the stack trace points to the string I created.
It doesn't really make sense to me why there would be a memory leak relating to std::string
, so I am asking here. Thanks!