-
Intellij is warning me that I should wrap Do I need to track the returned values of the glfwSet*Callback and free them? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Oh, you can ignore lots of those warnings from IntelliJ. They're all over the place for lots of stuff. I ignore almost all of them. But, every now and then, they're useful at picking up something I missed, or some design ideas that didn't execute so well. Just make a call to |
Beta Was this translation helpful? Give feedback.
Oh, you can ignore lots of those warnings from IntelliJ. They're all over the place for lots of stuff. I ignore almost all of them. But, every now and then, they're useful at picking up something I missed, or some design ideas that didn't execute so well.
Just make a call to
glfwFreeCallbacks
before destroying your window. Your Java lambdas need to be converted into native functions, which is what LibFFI does for LWJGL when you pass Java lambdas to functions in the LWJGL bindings, that take function pointers. So you need to free this native function that is generated, once you're done with it.