sciter-sdk / go-sciter

Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development
https://sciter.com
2.58k stars 267 forks source link

OpenArchive should store a link to the byte slice #294

Open ameshkov opened 3 years ago

ameshkov commented 3 years ago

The problem is that Sciter.OpenArchive does not guarantee that the byte array won't be collected by the garbage collector. Eventually, this often leads to archive corruption.

The easy way to solve this would be to store a link to the byte slice, that's passed to OpenArchive or at least mention that it should be saved in the documentation or the method comment.