Subtypes of structs are not free'ing their allocated memory
In this case the allocated memory for the field string s
of local variable Bar bar
is not freed.
Bar
is not considered disposable and bar_destroy
is not generated. Additionally bar_copy
is not generated and therefore bar_dup
is not doing the right thing.
struct Foo {
public string s;
}
struct Bar : Foo {
}
void main () {
Bar bar = { "bar" };
Foo foo = bar;
}