flag: add a .free() method

pull/9440/head
Delyan Angelov 2021-03-23 20:36:46 +02:00
parent 7f91b75cbc
commit a593ff930f
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 12 additions and 0 deletions

View File

@ -38,6 +38,18 @@ pub mut:
args_description string
}
[unsafe]
fn (mut f FlagParser) free() {
unsafe {
f.args.free()
f.flags.free()
f.application_name.free()
f.application_version.free()
f.application_description.free()
f.args_description.free()
}
}
pub const (
// used for formating usage message
space = ' '