Questions tagged [quit]
156 questions
7
votes
1 answer
How to distinguish between different causes of app termination in Cocoa?
I would like my application to ask for confirmation before quitting, except when it's being terminated by the system during shutdown or restart (because when OS X tries to apply security updates at midnight it gets stuck on the "Are you sure?"…

Kornel
- 97,764
- 37
- 219
- 309
7
votes
2 answers
SDL 2.0 Quit Event with Multiple Windows
I'm using SDL 2.0, and decided to try out making multiple windows. Unfortunately, now I can't quit out of my program without going back to the IDE and force closing it.
The event handling is as simple as possible, I am only polling for the quit…

Sethbeastalan
- 71
- 1
- 3
6
votes
1 answer
How do I force-quit an individual app on an actual Apple Watch (not in the simulators)?
When developing an app, it is sometimes useful to force-quit an application without having to re-start the entire device.
On my iPhone, I can force-quit the active app by double-clicking the home button and swiping the app to the top.
For the…

John
- 8,468
- 5
- 36
- 61
6
votes
2 answers
Exit an imported module without exiting the main program - Python
I have a module called randomstuff which I import into my main program. The problem is that at times, the code being run in randomstuff needs to be stopped, without affecting the main program.
I have tried exit(), quit() and a few os functions, but…

user3147471
- 63
- 1
- 6
5
votes
2 answers
How to quit a pygtk application after last window is closed/destroyed
Is there a way I can tell gtk to automatically call gtk.main_quit() when the last open window of the application is closed/destroyed?
If there is no direct feature offering this functionality, I could think of the following:
In the window's destroy…

rumpel
- 7,870
- 2
- 38
- 39
5
votes
0 answers
Debugging SHDocVw.InternetExplorer.Quit not closing iexplore.exe process
I think there's no definite answer so how would you approach debugging this problem?:
My main app (a MicroStation plugin) launces IE using the SHDocVw.InternetExplorer COM wrapper, interacts with it, hides it when it is not used (e.g. intercepts…

axk
- 5,316
- 12
- 58
- 96
5
votes
2 answers
Mobile game restarts when using Application.Quit
Okay, so I upgrade my old 4.6 Unity project into Unity 5.0. Overall, the process was relatively painless, but now my Quit button doesn't work when I build for Android.
And I get a very odd message via logcat:
E/Unity (23691): RenderTexture…

theprisoner6
- 81
- 1
- 5
5
votes
3 answers
Run top, print output, then quit OR how to get real memory usage without top
I'm running Mac OS 10.6. I want to run top to get memory usage, but not in interactive mode, or any mode that updates. I just want memory usage at that point in time then return to prompt. I've looked for other utilities to get memory usage... but…

physicsmichael
- 4,793
- 11
- 35
- 54
5
votes
3 answers
Stop an app by calling the lifecycle callbacks
How can I stop my whole App in simple terms? (all activities, services, Threads, etc. simply everything) The life-cycle callbacks (especially onStop() and onDestroy()) should be called.
Google suggests the following possible solution:
kill the…

felixd
- 383
- 2
- 7
- 20
4
votes
3 answers
Best way to quit android app?
I'm looking for a way to quit my android app by code.
Yes, I know, I shouldn't be doing this cause android handles it when you press the back button, but I have a customized flow that forces me to implement this. I've already been searching for a…

Arne517
- 825
- 2
- 8
- 14
4
votes
2 answers
iOS - detect when application exits
How can I detect when a user exits the application? (hitting the home button)
And how can I detect when the relaunch it? (clicking the icon)
*I'm not talking about users manually quitting the app by holding the home button and then making the icons…

Albert Renshaw
- 17,282
- 18
- 107
- 195
4
votes
4 answers
does dealloc method being executed normally when quitting the application?
I use code like the following (inside my appController.m for example) to do some cleanup when my application terminates...
- (void) dealloc {
[myObject release]; // myObject 's dealloc will not be called either !!!
[arraySMSs release];
…

Vassilis
- 2,878
- 1
- 28
- 43
4
votes
2 answers
Force quit of Android App using System.exit(0) doesn't work
when I try to quit my Android application by overwriting the function for the back-button of Android devices and "System.exit(0)", this doesn't work.
I have an activity named "LoginActivity" and an activity named "OverviewActivity".
When I start an…

Maarkoize
- 2,601
- 2
- 16
- 34
4
votes
1 answer
Are there any perils with quit and exit in matlab?
I have not thought so much of this before I started learning c++ and I have not needed to terminate matlab from a program so many times before. The question just occured to me:
Are there any perils in using the functions quit and exit in matlab? I…

patrik
- 4,506
- 6
- 24
- 48
4
votes
2 answers
How to get pygame to quit after playing a song
I'm trying to use this tutorial to run pygame instead of Mplayer in my script:
So, in the code:
import pygame
pygame.init()
song = pygame.mixer.Sound(my_song.ogg)
clock = pygame.time.Clock()
song.play()
while True:
…

Guillaume
- 2,752
- 5
- 27
- 42