J
jarmopy
Hi,
I have made a service with C# and calling that service class from another C#
program with remoting.
(Referendes from the calling program)
That service class is configured so that garpage collection is not used in
this class.
(singleton class + override InitializeLifetimeService )
The service class uses C++ unmanaged function from dll (using DLLimport).
The C++ function uses void pointer which is corrupted after the solution is
called some times.
The void pointer is allocated in the C++ code (dll) when one class is
allocated dynamically (with new).
The pointer is not marshaled to the service class.
I think that the problem is maybe .NET garpage collection in this case,
because same solution is working when calling from an ordinary C++ code
(unmanaged).
How is the memory handling going in this case ?
Is it possible that the .NET service code still frees the memory even if it
is in unmanaged dll ?
Should it help if the pointer is marshaled to the service singleton class or
would the situation be the same ?
(This is the next Iam going to try)
Thanks !
I have made a service with C# and calling that service class from another C#
program with remoting.
(Referendes from the calling program)
That service class is configured so that garpage collection is not used in
this class.
(singleton class + override InitializeLifetimeService )
The service class uses C++ unmanaged function from dll (using DLLimport).
The C++ function uses void pointer which is corrupted after the solution is
called some times.
The void pointer is allocated in the C++ code (dll) when one class is
allocated dynamically (with new).
The pointer is not marshaled to the service class.
I think that the problem is maybe .NET garpage collection in this case,
because same solution is working when calling from an ordinary C++ code
(unmanaged).
How is the memory handling going in this case ?
Is it possible that the .NET service code still frees the memory even if it
is in unmanaged dll ?
Should it help if the pointer is marshaled to the service singleton class or
would the situation be the same ?
(This is the next Iam going to try)
Thanks !