ThRuST Well-Known Member Licensed User Longtime User Nov 23, 2018 #1 Like the headline says, how to unload an imageview from memory after it's been initialized? This only removes the image, but the object is still allocated in memory (isInitialized true) Code: Copy ImageView1.RemoveNodeFromParent Last edited: Nov 23, 2018
Like the headline says, how to unload an imageview from memory after it's been initialized? This only removes the image, but the object is still allocated in memory (isInitialized true) Code: Copy ImageView1.RemoveNodeFromParent
XbNnX_507 Active Member Licensed User Longtime User Nov 23, 2018 #2 ImageView1.Bitmap = Null Upvote 0
ThRuST Well-Known Member Licensed User Longtime User Nov 23, 2018 #3 @XbNnX_507 Really? I mast try this. Thank Jo Upvote 0
ThRuST Well-Known Member Licensed User Longtime User Nov 23, 2018 #4 In this case, how about Code: Copy ImageView1.SetImage (Null) ? Upvote 0
ThRuST Well-Known Member Licensed User Longtime User Nov 23, 2018 #5 @XbNnX_507 How do you access Bitmap from Imageview? Please privide an example Upvote 0
XbNnX_507 Active Member Licensed User Longtime User Nov 23, 2018 #6 ThRuST said: How do you access Bitmap from Imageview? Please privide an example Click to expand... Code: Copy Dim yourImage as Image= ImageView1.GetImage Upvote 0
ThRuST said: How do you access Bitmap from Imageview? Please privide an example Click to expand... Code: Copy Dim yourImage as Image= ImageView1.GetImage
ThRuST Well-Known Member Licensed User Longtime User Nov 23, 2018 #7 ImageView1.Bitmap = Null Click to expand... @XbNnX_507 Do you mind provide a complete example because I'm all confused now Upvote 0
ImageView1.Bitmap = Null Click to expand... @XbNnX_507 Do you mind provide a complete example because I'm all confused now
XbNnX_507 Active Member Licensed User Longtime User Nov 23, 2018 #8 Code: Copy ImageView1.Bitmap = null ' B4A Syntax ImageView1.setImage( Null ) ' B4J syntax My Bad. Upvote 0
ThRuST Well-Known Member Licensed User Longtime User Nov 23, 2018 #9 Well, I suspected it but I didn't want to make you feel sorry you made a misstake, but it was good we sorted this out. I was convinced that you knew I was asking about B4J, so this answer is specific for that. Anyway, I checked isInitialized and it says true so I am not sure you understood my headline. It's one thing to have the image removed, but the object instance seems to be still active. I guess the old BASIC command ReDim will tell you what I mean. So now when we know how to clear image data we should successfully UNLOAD the object. Anyone? Upvote 0
Well, I suspected it but I didn't want to make you feel sorry you made a misstake, but it was good we sorted this out. I was convinced that you knew I was asking about B4J, so this answer is specific for that. Anyway, I checked isInitialized and it says true so I am not sure you understood my headline. It's one thing to have the image removed, but the object instance seems to be still active. I guess the old BASIC command ReDim will tell you what I mean. So now when we know how to clear image data we should successfully UNLOAD the object. Anyone?
ThRuST Well-Known Member Licensed User Longtime User Nov 23, 2018 #10 Something like Code: Copy ImageView1.Close so there must be a way to unload each of the controls that is initialized, right? Upvote 0
Something like Code: Copy ImageView1.Close so there must be a way to unload each of the controls that is initialized, right?
XbNnX_507 Active Member Licensed User Longtime User Nov 23, 2018 #11 Code: Copy ImageView1.SetImage( Null ) ' <- Just to clear the image reference from the view. ImageView1.RemoveNodeFromParent ' Remove from the UI ImageView1 = Null '<- remove reference Log ( ImageView1.isInitialized ) ' <- False Upvote 0
Code: Copy ImageView1.SetImage( Null ) ' <- Just to clear the image reference from the view. ImageView1.RemoveNodeFromParent ' Remove from the UI ImageView1 = Null '<- remove reference Log ( ImageView1.isInitialized ) ' <- False
ThRuST Well-Known Member Licensed User Longtime User Nov 23, 2018 #12 @XbNnX_507 Nice, now we're talking and do you have the solution for B4A and B4i as well while you're owning the dance floor? Upvote 0
@XbNnX_507 Nice, now we're talking and do you have the solution for B4A and B4i as well while you're owning the dance floor?
Erel B4X founder Staff member Licensed User Longtime User Nov 25, 2018 #13 B4XView.RemoveViewFromParent removes a view in the three platforms. In most cases this is the only thing that you need to do to release a view. Upvote 0
B4XView.RemoveViewFromParent removes a view in the three platforms. In most cases this is the only thing that you need to do to release a view.