MT4 string.dll memory leak wows still

 

I have a DLL that I have re written to control my EA and in so doing I have introduced a memory leak. From forum readings I understand that this is likely do to not destroying the string arrays in the DLL. Rather than passing a string back as I did originally i simply pass the pointer to the string and have the dll return the data. I unfortunate have not been able to eliminate the memory leak.

I have been able to create a dummy dll that does nothing more than strcpy a string into the pointer that the EA sends. Here there is no memory leak which is to be expected. Thus I conclude that my memory wows are not caused by the string pass any longer but something else in the DLL.

Rather than create a bunch of BS TCP/IP stacks to worry about, I am leveraging the HTML port to communicate with my EA.

For all char arrays created I have destroyed their contents with a delete();

What else could I be missing?

I do use some cstring variables as well, DO I have to destroy these vars as well before returning?

Is there any kind of debugging I can do to find the leak?

I am at a miss now that I have exhausted everything I can think of to resolve this issue.

The one thing I am not doing is destroying the char strings that are passed from MT4 to the DLL could this be the issue, Do I need to delete each of these accept the string pointer? That does not make sense to me.

Thanks

John

Visual C++ 2008