Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I first thought that doing Quit[] in a cell, or Evaluation->Quit kernel, is supposed to remove all Global variables, but I have a case where this is not happening, then I read that there is a command Quit from the menu to also shut down the front end, so I wanted to try that to see if that will clear those variables, which I suppose are saved by the front end. (I know I can ofcourse just type Remove["Globals`*"], but was looking looking at what seems like a symbols leakage problem with Manipulate.

Any one knows how to close the front end please?

I can't find this Quit command from the menu, which is supposed to be different from the Quit[] for the kernel? I only see Quit kernel in the menu. But when I try that, these variables are not cleared!

enter image description here

Again, the reason I wanted to do the above is because not all variables are cleared when I restart the kernel (either by Quit[] or by stopping the kernel from the menu:

enter image description here

Btw, according to this answer here Quit[] the kernel is supposed to clear all variables ! but this is not the case with me here. ps. I never even knew before there was a Quit command for the front end.

ps. I will be happy to post the code that generates this if needed.

thanks

edit(1)

According to help message above, it said there is Quit menu item to close the from end, but on windows, V 8.04, I only see Quit kernel, which is the same as Quit[] typed in the notebook.

enter image description here

share|improve this question
1  
Related: the comments on stackoverflow.com/a/8260394/695132 –  Szabolcs Jan 25 '12 at 10:21
add comment

2 Answers 2

up vote 11 down vote accepted

From your description you seem to have an open window containing Dynamic content, which is what prevents some variables being cleared by simply quitting the kernel (or rather they get redefined again).

So why don't you just close all windows containing any Manipulates or Dynamic and then use Quit[] (or Quit Kernel from the Evaluation menu) ?

The only menu command to quit the Front End is the "Quit Mathematica" menu item in the Mathematica menu, which will indeed work (in a rather radical way) until you reopen the same notebooks that caused the problem to start with.

share|improve this answer
1  
No @NasserM.Abbasi. Andrzej means that you should close the window(s) containing the actual Manipulate, since those are the source of your problem. Then you just use Quit[] in a (newly) open window –  magma Jan 25 '12 at 10:48
    
It might look pedantic, but I feel you really want to understand this: I think the important remark of Andrzej ia that the restart of the Kernel of course always removes the global symbols - it's the Manipulate/Dynamic which recreates them during it's initialization. –  Albert Retey Jan 25 '12 at 15:42
add comment

I cannot reproduce your problem, but the command to close a front end is FrontEndTokenExecute["Close"]. If you want to terminate the complete front end process (including all running notebooks), you use FrontEndTokenExecute["FrontEndQuit"]. There's also a middle-ground which closes all notebooks, but doesn't terminate the process: FrontEndTokenExecute["CloseAll"].

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.