bug(cheatcodes
): memory not deallocating after snapshot revertTo
#8890
Labels
A-cheatcodes
Area: cheatcodes
T-bug
Type: bug
T-perf
Type: performance
T-to-investigate
Type: to investigate
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (a117fbf 2024-05-13T00:22:16.352837000Z)
What command(s) is the bug in?
forge script script/testSnapshot.sol
Operating System
macOS (Apple Silicon)
Describe the bug
Description:
As suggested in the Foundry book, the snapshots that are reverted should be deleted from memory. However, my script demonstrates that this is not the case, as the memory usage keeps growing.
I wrote a simple Forge script to illustrate this behavior. You can run the script and observe the increasing memory usage during execution:
Expected Behavior:
After reverting to a snapshot, the memory allocated for that snapshot should be cleaned up or deallocated to prevent memory bloat.
Actual Behavior:
The memory usage continues to grow with each snapshot taken, even after it has been reverted.
Environment:
Steps to Reproduce:
Please investigate this issue to confirm whether the snapshots are not being properly deallocated from memory.
The text was updated successfully, but these errors were encountered: