-
-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
vmIssue related to the VMIssue related to the VM
Milestone
Description
Most of the time collect will clear external resources and should not be called more than once.
Currently, we avoid this with flag:
object File {
collected: bool = false,
// ...
mut fun collect() > void {
if (!this.collected) {
this.file.close();
this.collected = true;
}
}
// ...
}But this is not ideal, namely because nothing prevents collected to be modified by the user.
Buzz should itself enforce the fact that that special method is called once.
Metadata
Metadata
Assignees
Labels
vmIssue related to the VMIssue related to the VM