-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rcore] UnloadShader()
, new shader locations are not properly freed when shader fallback to default
#4641
Comments
@nagolove Good catch! Thanks for reporting! Just added a quick fix to make sure the default shader locations are returned in case of default shader fallback... but default shader fallback was supposed to be removed in latest I'm keeping this issue open while I review the full shader system because avoiding fallback could generate some crash. |
UnloadShader()
, new shader locations are not properly freed when shader fallback to default
I've been further reviewing this issue and it's a bit tricky, in case of shader loading failure, current implementation fallsback to
In case I think in this case it's just better to fallback to a default shader. |
Issue description
Raylib has memory leak in
Shader
unloading. When it could not load shader library put default shaders descriptors to creating structure. But when I unload this shaderlocs
array is not freed.raylib/src/rcore.c
Lines 1411 to 1420 in 7ecc47d
Environment
OS: Arch Linux x86_64
Raylib version: b079679
Code Example
Build command
The text was updated successfully, but these errors were encountered: