Should I remove parented vgui components along with its parent?

Basically:
[lua]
function LandName:Init()
self.Button1 = vgui.Create( “DButton”, self )
self.Button1:SetSize( 50, 50 )
self.Button1:SetPos( 5, 5 )
self.Button1:SetText( “One” )

self.Button2 = vgui.Create( “DButton”, self )
self.Button2:SetSize( 50, 50 )
self.Button2:SetPos( 60, 60 )
self.Button2:SetText( “Two” )
end

function LandName:Close()
self:Remove()
end

–Or should I do it like this?
–function LandName:Close()
– self.Button1:Remove()
– self.Button2:Remove()
– self:Remove()
–end
vgui.Register( “MyVGUI”, Panel, “DFrame” )
[/lua]
Does it really matter or make a difference, maybe someone has a little information on the subject?

No, I don’t think it makes a difference. Removing the parent should also remove everything parented to it.

All you have to do is remove the parent as stated above. Since the children are derived from it’s parent it will also close.

Thanks guys.

You do not have to override Close to make it remove itself when it’s closed.
It’s automatic.

[editline]aasd[/editline]
Well, unless you do
[lua]self:SetDeleteOnClose(false)[/lua]