Skip to content

The current data loading method poses a risk of memory leakage #18

@yjb6

Description

@yjb6

Currently, the data loading method, as shown in the following line, may pose a risk of memory leakage:

img = np.array(scene[f'image_{view_idx}'])

When I use a similar approach, i.e., obtaining the handle of the HDF5 file during dataset initialization and loading data iteratively, I noticed that my memory usage keeps increasing. I analyzed that this is because the handle is not closed, causing the data to remain in memory. Using the with statement to load data can resolve this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions