Re: GLFW3 Wrapper Issue
- Posted by ghaberek (admin) Jun 08, 2014
- 2573 views
Also, just a tip: add ", 1" to your calls to allocate_string() to allow automatic clean-up. Otherwise you've got a (very tiny) memory leak in those functions. Depending on how many times you call such functions, your program could eventually crash because it's out of memory.
public function glfwCreateWindow(integer w,integer h,sequence title,atom mon,atom win) atom str str = allocate_string(title, 1) -- cleanup = 1 return c_func(xglfwCreateWindow,{w,h,str,mon,win}) end function
-Greg