PDA

View Full Version : C# GC finalizer thread problem



keepdash
07-06-2012, 11:13 PM
Hi, I wrapper the opengl with managed C++ and use it in the C#, it is all OK except when I want to release the opengl resource.

The C# using another thread ( GC finalizer thread ) to do the release, but all my resources ( hwnd, hdc, context, fbo, texture...) are created in the main thread. So the release is failed.

I want ask how can I do the release correctly, I will be very thankful if there is some sample code.

Thank you!