Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
NewManLiving
Visitor

Leaked bsc instances:

Leaked bsc instances:
roInt refcnt= 1 addr=0x589fb2f8
roInt refcnt= 1 addr=0x78c2bd68

Happens periodically with calls to roRegion.Offset(). Happens less frequently with SetWrap(true).
The following code eases one message out and another in by simply easing the region offset.
It does not happen with m.StatMsgRegion.Offset(-l_offdiff, 0, 0, 0) commented out


Function scr_scroll_message() As Void

l_prevset = 0
l_frames = 20

for l_i = 0 to l_frames

l_offset = CubeEaseOut(l_i, l_frames, 0, m.StatMsgWidth)
l_offdiff = l_offset - l_prevset

if l_offdiff > 0
m.StatMsgRegion.Offset(-l_offdiff, 0, 0, 0)
m.Compositor.DrawAll()
m.Screen.SwapBuffers()
l_prevset = l_offset
end if

end for
End Function


Values of l_offdiff and GetX() Before and after roRegion.Offset Call

Offset Difference: 78
Before Offset GetX() 550
After Offset GetX() 472

Offset Difference: 71
Before Offset GetX() 472
After Offset GetX() 401

Offset Difference: 63
Before Offset GetX() 401
After Offset GetX() 338

Offset Difference: 56
Before Offset GetX() 338
After Offset GetX() 282

Offset Difference: 49
Before Offset GetX() 282
After Offset GetX() 233

Offset Difference: 44
Before Offset GetX() 233
After Offset GetX() 189

Offset Difference: 37
Before Offset GetX() 189
After Offset GetX() 152

Offset Difference: 33
Before Offset GetX() 152
After Offset GetX() 119

Offset Difference: 27
Before Offset GetX() 119
After Offset GetX() 92

Offset Difference: 23
Before Offset GetX() 92
After Offset GetX() 69

Offset Difference: 18
Before Offset GetX() 69
After Offset GetX() 51

Offset Difference: 15
Before Offset GetX() 51
After Offset GetX() 36

Offset Difference: 12
Before Offset GetX() 36
After Offset GetX() 24

Offset Difference: 9
Before Offset GetX() 24
After Offset GetX() 15

Offset Difference: 6
Before Offset GetX() 15
After Offset GetX() 9

Offset Difference: 4
Before Offset GetX() 9
After Offset GetX() 5

Offset Difference: 3
Before Offset GetX() 5
After Offset GetX() 2

Offset Difference: 1
Before Offset GetX() 2
After Offset GetX() 1

Offset Difference: 1
Before Offset GetX() 1
After Offset GetX() 0

My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
0 Kudos
3 REPLIES 3
NewManLiving
Visitor

Re: Leaked bsc instances:

well after testing it further it does not seem to be the function calls at all. By the message, I am assuming it to be some kind of memory leak. Since It was not happening yesterday (unless I didn't notice) , I'll try to go back and see what code was introduced that caused this. Unless any of you experts can enlighten me as to what causes this message to be generated. Sometimes they sort of stack up and then are released all at once. Is this something to be concerned about?
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
0 Kudos
TheEndless
Channel Surfer

Re: Leaked bsc instances:

They're just circular references that the garbage collector couldn't clean up until channel exit. They're much more common when you use Home to exit a channel, as your objects don't have the opportunity to release their references.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
NewManLiving
Visitor

Re: Leaked bsc instances:

Thank you TheEndless. Your screensaver was the
First one I purchased. Still using it.
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.