Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libRocket leaked elements detected #12

Open
GoogleCodeExporter opened this issue Apr 6, 2015 · 1 comment
Open

libRocket leaked elements detected #12

GoogleCodeExporter opened this issue Apr 6, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Do nothing.
2. Happens on shutdown.
3.

What is the expected output? What do you see instead?

We expect no leaking elements from libRocket. Instead during shutdown libRocket 
debugger reports:

47 leaked elements detected.
        (0) #text -> #text < tab:selected
        (1) #text -> #text < tab
        (2) #text -> #text < tab
        (3) tab -> tab
        (4) div -> div
        (5) form -> form#hdrhighform < div
        (6) select -> select#tone_mapper_select_id < form#hdrhighform < div
        (7) selectarrow -> selectarrow < select#tone_mapper_select_id < form#hdr
highform < div
        (8) selectvalue -> selectvalue < select#tone_mapper_select_id < form#hdr
highform < div
        (9) selectbox -> selectbox < select#tone_mapper_select_id < form#hdrhigh
form < div
        (10) select -> select#glare_type_select_id < form#hdrhighform < div
        (11) selectarrow -> selectarrow < select#glare_type_select_id < form#hdr
highform < div
        (12) selectvalue -> selectvalue < select#glare_type_select_id < form#hdr
highform < div
        (13) selectbox -> selectbox < select#glare_type_select_id < form#hdrhigh
form < div
        (14) tab -> tab
        (15) tab -> tab
        (16) div -> div
        (17) form -> form#cineform < div:focus
        (18) select -> select#camera_select_id < form#cineform:focus < div:focus

        (19) #text -> #text < option < selectbox < select#tone_mapper_select_id
< form#hdrhighform < div
        (20) #text -> #text < option < selectbox < select#tone_mapper_select_id
< form#hdrhighform < div
        (21) #text -> #text < option < selectbox < select#tone_mapper_select_id
< form#hdrhighform < div
        (22) #text -> #text < option < selectbox < select#tone_mapper_select_id
< form#hdrhighform < div
        (23) #text -> #text < option < selectbox < select#tone_mapper_select_id
< form#hdrhighform < div
        (24) #text -> #text < option < selectbox < select#tone_mapper_select_id
< form#hdrhighform < div
        (25) #text -> #text < option < selectbox < select#tone_mapper_select_id
< form#hdrhighform < div
        (26) #text -> #text < option < selectbox < select#tone_mapper_select_id
< form#hdrhighform < div
        (27) #text -> #text < option < selectbox < select#glare_type_select_id <
 form#hdrhighform < div
        (28) #text -> #text < option < selectbox < select#glare_type_select_id <
 form#hdrhighform < div
        (29) #text -> #text < option < selectbox < select#camera_select_id:focus
 < form#cineform:focus < div:focus
        (30) #text -> #text < option < selectbox < select#camera_select_id:focus
 < form#cineform:focus < div:focus
        (31) #text -> #text < selectvalue < select#camera_select_id:focus < form
#cineform:focus < div:focus
        (32) selectarrow -> selectarrow < select#camera_select_id:focus < form#c
ineform:focus < div:focus
        (33) selectvalue -> selectvalue < select#camera_select_id:focus < form#c
ineform:focus < div:focus
        (34) selectbox -> selectbox < select#camera_select_id:focus < form#cinef
orm:focus < div:focus
        (35) option -> option < selectbox < select#tone_mapper_select_id < form#
hdrhighform < div
        (36) option -> option < selectbox < select#tone_mapper_select_id < form#
hdrhighform < div
        (37) option -> option < selectbox < select#tone_mapper_select_id < form#
hdrhighform < div
        (38) option -> option < selectbox < select#tone_mapper_select_id < form#
hdrhighform < div
        (39) option -> option < selectbox < select#tone_mapper_select_id < form#
hdrhighform < div
        (40) option -> option < selectbox < select#tone_mapper_select_id < form#
hdrhighform < div
        (41) option -> option < selectbox < select#tone_mapper_select_id < form#
hdrhighform < div
        (42) option -> option < selectbox < select#tone_mapper_select_id < form#
hdrhighform < div
        (43) option -> option < selectbox < select#glare_type_select_id < form#h
drhighform < div
        (44) option -> option < selectbox < select#glare_type_select_id < form#h
drhighform < div
        (45) option -> option < selectbox < select#camera_select_id:focus < form
#cineform:focus < div:focus
        (46) option -> option < selectbox < select#camera_select_id:focus < form
#cineform:focus < div:focus
GuiController::shutDown()

What I think is going on:

It has to do with creation elements (Selection in this case) with c++ code.  
LibRocket has this reference counting thing but you have to manually call 
ReleaseReference on objects. Since I'm new, I'm not sure when to call this 
ReleaseReference. I think you are supposed to call it whenever you add an 
object to something, since the place where you added this object to now has a 
reference of this object, you need to call ReleaseReference after adding, 
manually. This is confusing.  

Original issue reported on code.google.com by LLw...@gmail.com on 12 Jan 2011 at 7:47

@GoogleCodeExporter
Copy link
Author

No actual memory are leaked. You are managing these elements with librocket, so 
when you create them, all you have are pointers to objects managed by 
libRocket. 

This is just libRocket's way of saying, you created these through me, but you 
never asked me to remove them, but I"m going to remove them for you now since 
you asked me to shutdown.

I think. 

Original comment by LLw...@gmail.com on 12 Jan 2011 at 8:11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant