CString::AllocSysString() needs to be free'd?  
Author Message
travhale





PostPosted: Top

Visual Studio C++ >> CString::AllocSysString() needs to be free'd? Hello!

I'm using VC++ 7.0 (.net 2002) and MFC.

I have a function (foo) that uses a CString variable (strCommand) as a
parameter. foo is accessing a database via ADO. Among the code is this:

pCommand->put_CommandText(strCommand.AllocSysString());


Do I need to free the memory allocated to string or will it do so
automatically?

// Anders

Crossposted to: microsoft.public.dotnet.languages.vc,microsoft.public.vc.language,microsoft.public.vc.mfc
Replies will go to: microsoft.public.dotnet.languages.vc

Visual Studio216