mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-04 15:04:28 +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() {
|
func (s *Shader) dispose() {
|
||||||
|
runtime.SetFinalizer(s, nil)
|
||||||
|
if s.shader == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
s.shader.Dispose()
|
s.shader.Dispose()
|
||||||
s.shader = nil
|
s.shader = nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user