mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-24 18:02:02 +01:00
shareable: Allow multiple call of (*Shader).Dispose
This commit is contained in:
parent
9c637c65be
commit
18c59e44aa
@ -47,6 +47,10 @@ func (s *Shader) MarkDisposed() {
|
||||
}
|
||||
|
||||
func (s *Shader) dispose() {
|
||||
runtime.SetFinalizer(s, nil)
|
||||
if s.shader == nil {
|
||||
return
|
||||
}
|
||||
s.shader.Dispose()
|
||||
s.shader = nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user