B4J Question Unload imageview

ThRuST

Well-Known Member
Licensed User
Longtime User
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)

B4X:
ImageView1.RemoveNodeFromParent
 
Last edited:

ThRuST

Well-Known Member
Licensed User
Longtime User
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

ThRuST

Well-Known Member
Licensed User
Longtime User
Something like

B4X:
ImageView1.Close

so there must be a way to unload each of the controls that is initialized, right?
 
Upvote 0

XbNnX_507

Active Member
Licensed User
Longtime User
B4X:
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
Top