Skip to content

Commit 6e1c7b1

Browse files
committed
Docs: Mentioned the need for ImageBitmap.close().
1 parent 66d3ccb commit 6e1c7b1

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

docs/examples/en/loaders/GLTFLoader.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ <h1>[name]</h1>
2020
textures, skins, skeletons, morph targets, animations, lights, and/or cameras.
2121
</p>
2222

23+
<p>
24+
[name] uses [page:ImageBitmapLoader] whenever possible. Please keep in mind that image bitmaps are not automatically GC-collected when they are not referenced anymore.
25+
They require a special handling during the disposal process. More information in the [link:http://localhost:8080/docs/index.html#manual/en/introduction/How-to-dispose-of-objects How to dispose of objects] guide.
26+
</p>
27+
2328
<h2>Extensions</h2>
2429

2530
<p>

docs/examples/zh/loaders/GLTFLoader.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ <h1>GLTF加载器([name])</h1>
1919
包括网格、材质、贴图、蒙皮、骨架、变形目标、动画、灯光以及摄像机。
2020
</p>
2121

22+
<p>
23+
[name] uses [page:ImageBitmapLoader] whenever possible. Please keep in mind that image bitmaps are not automatically GC-collected when they are not referenced anymore.
24+
They require a special handling during the disposal process. More information in the [link:http://localhost:8080/docs/index.html#manual/en/introduction/How-to-dispose-of-objects How to dispose of objects] guide.
25+
</p>
26+
2227
<h2>扩展</h2>
2328

2429
<p>

docs/manual/en/introduction/How-to-dispose-of-objects.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ <h2>Textures</h2>
4444
Similar to buffers, this object can only be deleted by calling [page:Texture.dispose]().
4545
</p>
4646

47+
<p>
48+
If you use an *ImageBitmap* as the texture's data source, you have to call [link:https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap/close ImageBitmap.close]()
49+
on application level to dispose of all CPU-side resources. An automated call of *ImageBitmap.close()* in [page:Texture.dispose]() is not possible since the image bitmap becomes
50+
unusable and the engine does not know whether the image bitmap is used elsewhere or not.
51+
</p>
52+
4753
<h2>Render Targets</h2>
4854

4955
<p>

0 commit comments

Comments
 (0)