D
DaTurk
Hi,
I have several interfaces in CLI that I access via c#. My problem is,
is that down in the unmanaged c++, which the CLI lies on top of, I
have a lot of c_str() happening. But all of my methods in CLI return
System::String^. I originally just gcnew'd System::String^ passing in
the c_str(). But I can't really have as many gcnew's as I'm using for
overhead and for fear of leaks.
So my question is this, how can I get the char* coming from c_str()
call to return as a System::String^ without actually calling gcnew?
The reason this is an issue is that these libraries are pushed quite
hard, maybe having string coming through in excess of 100 time a
second and will most likely never be turned off. Any ideas?
THanks in advance.
I have several interfaces in CLI that I access via c#. My problem is,
is that down in the unmanaged c++, which the CLI lies on top of, I
have a lot of c_str() happening. But all of my methods in CLI return
System::String^. I originally just gcnew'd System::String^ passing in
the c_str(). But I can't really have as many gcnew's as I'm using for
overhead and for fear of leaks.
So my question is this, how can I get the char* coming from c_str()
call to return as a System::String^ without actually calling gcnew?
The reason this is an issue is that these libraries are pushed quite
hard, maybe having string coming through in excess of 100 time a
second and will most likely never be turned off. Any ideas?
THanks in advance.