We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4a468c commit a7ea3cdCopy full SHA for a7ea3cd
src/state_transition/utils/ref_count.zig
@@ -19,12 +19,14 @@ pub fn RefCount(comptime T: type) type {
19
return ptr;
20
}
21
22
- /// private deinit, consumer should call release() instead
+ /// private deinit, consumer should call unref() instead
23
fn deinit(self: *@This()) void {
24
self.instance.deinit();
25
self.allocator.destroy(self);
26
27
28
+ /// caution: this returns a copy of the instance, make sure this does not have copy overhead
29
+ /// or use pointer type instead
30
pub fn get(self: *@This()) T {
31
return self.instance;
32
0 commit comments