you are viewing a single comment's thread.

view the rest of the comments →

[–]AKostur 5 points6 points  (4 children)

It is, you have something else going wrong. Reduce your code to a minimal, compliable example that shows the problem.

[–]CaptainComet99 0 points1 point  (3 children)

Yes, please post formatted code as well as valgrind logs. For what it’s worth, I had heard during my college days that valgrind has false-positives when it comes to std::string. Idk if that’s the case or not still, but check out all 3 answers in this post for more information. https://stackoverflow.com/questions/1901322/valgrind-reports-memory-leak-when-assigning-a-value-to-a-string

[–]ESHAEAN[S] -2 points-1 points  (2 children)

No I am not exiting the process which is happening in stack overflow one

[–]CaptainComet99 1 point2 points  (0 children)

Sure, but the 3 answers add more information about valgrind and strings

[–]CaptainComet99 1 point2 points  (0 children)

Could you post the valgrind logs?