Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ratish
Level 7

Reference count watch

Please suggest a way to print reference count of some object references in brightscript without halting the application.
0 Kudos
1 REPLY 1
RokuKC
Roku Employee
Roku Employee

Re: Reference count watch

Currently there isn't any way to get or print object reference counts programmatically.

In case it is helpful, e.g. for development leak monitoring, you can get a total object count from RunGarbageCollector().

Note that if you stop or break into the BrightScript debugger, there are some commands to get information.
'var' shows local variables including ref count, 'bsc' shows an anonymous listing of objects including ref count, and 'bscs' (on firmware 6.1 or later) shows a summary of object counts by type.
0 Kudos