smart_reference

Creator: coderz1093

Last updated:

0 purchases

smart_reference Image
smart_reference Images

Languages

Categories

Add to Cart

Description:

smart reference

Features #
参照カウンタ付きオブジェクトを保持する.
Usage #
var disposed = false;
final ref = SmartReference.wrap(
reference: 100,
dispose: (value) {
disposed = true;
},
);

ref.addRef(); // ref == 2;
ref.release(); // ref == 1;
ref.release(); // ref == 0, call dispose();
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.