CUDA with wxWidgets.... app exits when CUDA call

I’m building something that draws a histogram, just a demo.

I’m using wxWidgets to build my UI. But the app always exit when there’s a CUDA call.

VS 2005, Debug information says it returns 1, that’s a normal quit.

And I tried run the app without CUDA call, everything’s OK, and exit as long as there’s a CUDA call , even a “Hello, CUDA”.

So, anyone can help ?

Thanks.

===========================================

Solved…memory leaks…
EXEfile.rar (926 KB)