<p></p>
<p><b>@sqrrm</b> commented on this pull request.</p>

<p>It looks safe, just want to clarify my confusion with the memory reset order</p><hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/5609#discussion_r665433670">core/src/main/java/bisq/core/dao/state/storage/DaoStateStorageService.java</a>:</p>
<pre style='color:#555'>> +                // After we have written to disk we remove the reference to the daoState. We have in the meantime
+                // already cloned the next daoState and if we would not release the reference we would have 3 times
+                // the daoState data in memory.
+                store.setDaoState(null);
</pre>
<p>It looks to me like the store is reset before completehandler is called which is where the new clone of daoState is made. Comment makes it seem like the clone is made before store is cleared.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/5609#pullrequestreview-701089818">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNRFMPG3QRRV7EKZUPDTWRRK7ANCNFSM475F7XPA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNQ4XYJABVT3RC3DICTTWRRK7A5CNFSM475F7XPKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOFHE4QGQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/5609#pullrequestreview-701089818",
"url": "https://github.com/bisq-network/bisq/pull/5609#pullrequestreview-701089818",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>