Skip to content

Commit 7d4f4c2

Browse files
committed
feat: add clean function
1 parent 9b41fe1 commit 7d4f4c2

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/lib.c.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ fn C.webui_set_position(win Window, x usize, y usize)
5151
fn C.webui_set_profile(win Window, name &char, path &char)
5252
fn C.webui_get_url(win Window) &char
5353
fn C.webui_navigate(win Window, url &char)
54+
fn C.webui_clean()
5455

5556
// -- JavaScript ----------------------
5657
fn C.webui_run(win Window, script &char)

src/lib.v

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,11 @@ pub fn (w Window) navigate(url string) {
234234
C.webui_navigate(w, &char(url.str))
235235
}
236236

237+
// clean frees all memory resources. Should be called only at the end.
238+
pub fn clean() {
239+
C.webui_clean()
240+
}
241+
237242
// == Javascript ==============================================================
238243

239244
// run executes JavaScript without waiting for the response.

0 commit comments

Comments
 (0)