Even though you delete the struct the string isn't deleted. Remove the pointer to the string and use the string directly instead.
You can also add a destructor to the struct but avoiding to allocating yourself is better.
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 3 of 3
Thread: Memory Leak using stringThreaded View
|
Click Here to Expand Forum to Full Width |