Format
typescript
RenderTexture.ReleaseCPUMemory()class: RenderTexture
Description
Manually clears CPU memory related to textures.
Parameters
| param_name | type | description |
|---|
Return
| type | description |
|---|---|
void |
Code Example
typescript
function Test() {
try {
let temp_texture = RenderTexture.GetTemporary(100, 100, RenderTextureFormat.Default, DepthType.Depth24Stencil8, AntiAliasingLevel.x8);
let pixel = temp_texture.GetPixel(10,20,1)
texture.ReleaseCPUMemory();
} catch (error) {
Debug.Log(error);
}
}