File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ let mk-one-owned-data(tt: Type<t>): OneOwnedData<t>[] = (
1010 (sizeof(OneOwnedData<t>) as USize) + (sizeof(t) as USize),
1111 type(OneOwnedData<t>)
1212 );
13+ od.reference-count = 1;
1314 od
1415);
1516
@@ -50,7 +51,7 @@ let close(d: t): OneOwnedData<t>[] = (
5051
5152let .release(od: OneOwnedData<t>[]): Nil = (
5253 if (od as USize)!=0 {
53- if od.reference-count==0 then fail(c"OwnedData .release called when reference count is already zero. This object has already been freed!");
54+ if od.reference-count==0 then fail(c"OneOwnedData .release called when reference count is already zero. This object has already been freed!");
5455 od.reference-count = od.reference-count - 1;
5556 if od.reference-count == 0 {
5657 if type(t) <: type(MustRelease) {
@@ -63,7 +64,7 @@ let .release(od: OneOwnedData<t>[]): Nil = (
6364
6465let .retain(od: OneOwnedData<t>[]): Nil = (
6566 if (od as USize)!=0 {
66- if od.reference-count==0 then fail(c"OwnedData .retain called when reference count is zero. This object has already been freed!");
67+ if od.reference-count==0 then fail(c"OneOwnedData .retain called when reference count is zero. This object has already been freed!");
6768 od.reference-count = od.reference-count + 1;
6869 }
6970);
You can’t perform that action at this time.
0 commit comments