Difference between Panel:Close() and Panel:Remove()?

I’ve been using both of these commands, and Panel:Remove() works on more vgui elements, such as buttons. But, is there actually a difference between these?

I had no idea Close existed on other panels, normally it would only be used for closing DFrames I believe. There might be some other elements you can ‘close’ like menus but if your intent is to remove something then call Remove

Okay. What I really wanted to know is whether Close() COMPLETELY removes DFrames. Sometimes if I use self:Close() before something like print(“something”) in a DFrame’s code, it still runs for some reason.

[editline]29th April 2015[/editline]

I guess it’d be stupid if functions like DFrame.Close didn’t run because the panel doesn’t exist (that’s where I used print(“something”)).

[editline]29th April 2015[/editline]

Your name description made me think of a question. Do I need to localize a function for an already local DFrame?

close is only available for frames

close only makes them invisible (and also calls onclose and something iirc)

this is so that you don’t have to recreate the entire frame and all its contents if you want to make it visible again at a later time

recreating panels is slow and can cause fps spikes

[editline]29th April 2015[/editline]

remove completely deletes panels from memory and you’ll get errors if you try to access them at a later time