Quick question to anyone using SDL with Emscripten for WebAssembly.  If I 
were writing an SDL application for Windows or Linux, when the application 
closed I would want to execute the following lines for clean up:

SDL_DestroyWindow(window);
SDL_Quit();

So I wrote a little WebAssembly SDL app that I wanted to draw to the canvas 
once and the stop.  I noticed that in Firefox, I could run the clean up 
code at the end of my main function and everything would work fine, but 
Chrome would display an error page as soon as the main function executed 
these lines of code.  If I deleted the lines Chrome would work fine too.  

So my questions are:
Should I be using these clean up lines at all within my WebAssembly 
module?  
Or should I just let the browser worry about the allocated memory when 
someone leaves the page?  

Any thoughts or suggestions on SDL cleanup in a WebAssembly module would be 
appreciated.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to