Search Issue Tracker

Active

Under Consideration for 2022.3.X, 6000.0.X, 6000.1.X, 6000.2.X

Votes

19

Found in

2022.3.62f1

6000.0.49f1

6000.1.3f1

6000.2.0b1

Issue ID

UUM-105139

Regression

Yes

UnmanagedReadOrWrite objects are not disposed off when GZipStream is used in the "using" statement

-

How to reproduce:
1. Open attached “IN-99816” project
2. In the Project tab, open the “SampleScene”
3. Enter Play mode
4. In the Hierarchy, select the “test” GameObject
5. Wait for ~5 seconds
6. In the Inspector, under the “Gzip Test” script component, toggle the “Take Snap” property
7. Exit Play mode
8. In the title bar, navigate to Window > Analysis > Memory Profiler
9. On the left side of the Memory Profiler window, select the most recent Snapshot
10. In the top of the window, select the “All Of Memory” tab
11. In the search bar, enter “Unmanaged”
12. Expand the “Managed” and “Managed Objects” items
13. Observe the Memory Profiler window

Expected result: “System.IO.Compression.DeflateStreamNative.UnmanagedReadOrWrite” item count is 2
Actual result: “System.IO.Compression.DeflateStreamNative.UnmanagedReadOrWrite” item count is in the thousands

Reproducible with: 2022.3.62f1, 6000.0.35f1 (ed4dc7af2c82), 6000.0.49f1, 6000.1.3f1, 6000.2.0b1
Not reproducible with: 6000.0.34f1

Reproducible on: Windows 11
Not reproducible on: No other environments tested

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.