In the unmanaged C++ client, why couldn I put the __gc modifier on the managed class?
The managed class in an unmanaged client has to be accessible by the unmanaged code in the application. When a managed class is marked for garbage collection, it can’t be accessed by any unmanaged code. The reverse situation is seen when you have a managed, garbage-collected class accessing an unmanaged class. It seems that managed, garbage-collected objects can reach outside the managed sandbox to access unmanaged objects. It’s just that the garbage-collected objects are located on the CLR-managed heap, which can’t be accessed from the outside. But objects on the managed CLR heap can use non garbage-collected pointers to access objects on the outside.
Related Questions
- If I purchased Class C Shares which had an 18 month hold prior to the change, is my client still required to hold this position for 18 months or does the holding period drop to 12 months?
- Describe the advantages of writing a managed code application instead of unmanaged one. What’s involved in certain piece of code being managed?
- What is Managed Hosting vs UnManaged Hosting?