Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling creation and destruction #28

Open
greggman opened this issue Jan 20, 2023 · 4 comments
Open

Handling creation and destruction #28

greggman opened this issue Jan 20, 2023 · 4 comments

Comments

@greggman
Copy link
Collaborator

IIUC trace/replay never destroys a resource. That seems problematic. I can imagine creating a temp 2gig buffer, then destroying it, then creating another, then destroying it, etc....... If replay never destroys resources it will run out of memory.

@Kangz
Copy link
Collaborator

Kangz commented Jan 22, 2023

The trace should be correctly destroying resources no? That's why there is the WeakMap too.

@greggman
Copy link
Collaborator Author

The replay does not.

@Kangz
Copy link
Collaborator

Kangz commented Jan 23, 2023

The replay needs to keep the resources alive otherwise it's not possible to go back. Do you have another suggestion?

@greggman
Copy link
Collaborator Author

The trace should arguably record creation and destruction that happens during the trace. So there's the pool of objects that existed before the trace, and then objects added and destroyed during the trace. At replay, create the initial pool then create/destroy the rest in playback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants