diff options
Diffstat (limited to 'core')
| -rw-r--r-- | core/reference.cpp | 4 | ||||
| -rw-r--r-- | core/reference.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/core/reference.cpp b/core/reference.cpp index adae07ce3..509e132b5 100644 --- a/core/reference.cpp +++ b/core/reference.cpp @@ -59,6 +59,10 @@ void Reference::_bind_methods() { ObjectTypeDB::bind_method(_MD("unreference"),&Reference::unreference); } +int Reference::reference_get_count() const { + return refcount.get(); +} + void Reference::reference(){ refcount.ref(); diff --git a/core/reference.h b/core/reference.h index 54838e057..544da4104 100644 --- a/core/reference.h +++ b/core/reference.h @@ -53,6 +53,7 @@ public: bool init_ref(); void reference(); bool unreference(); + int reference_get_count() const; Reference(); ~Reference(); |
