Memory leak C++

后端 未结 10 561
野趣味
野趣味 2021-02-02 06:02

I just wrote a code in C++ which does some string manipulation, but when I ran valgrind over, it shows some possible memory leaks. Debugging the code to granular level I wrote a

10条回答
  •  抹茶落季
    2021-02-02 06:59

    #include
    using namespace std;
    int main()
    {
        {
            std::string myname("Is there any leaks");
        }
        exit(0);
    }
    

提交回复
热议问题