Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
17 votes
1 answer
1k views

I have a program where I allocated a lot of data and used multiple libraries. I have a cleanup procedure (can be a function, label, setjmp, or just a section of code) that frees allocated memory and ...
Omar Ahmed's user avatar
2 votes
1 answer
46 views

I want to run a batch file using subprocess.Popen ... then delete the batch file if I force exit (the red square STOP button in pycharm) with open('test.bat', "w", encoding='utf-8') as a: a....
Rhys's user avatar
  • 5,418
0 votes
1 answer
99 views

I am having a problem when trying to do resource cleanup in a background thread. The code running in the thread is meant to run indefinitely or until it is stopped and then cleanup is done. I could ...
0 votes
1 answer
59 views

If we run a Python program in a console on Windows (python myscript.py), is there a possibility to run a last line of code when the user clicks on the "X" top-right button of the console ...
Basj's user avatar
  • 47.6k
0 votes
1 answer
314 views

Background I am using the miniaudio library to implement the audio module in the open-source SFML 3.x library. As an attempt to simplify our audio resource management, I removed run-time reference ...
0 votes
1 answer
135 views

On GitHub I share an PyInstaller generated exe-File (file1.exe). The idea is an automatized update process if there is a new version of the file. On every start of file1.exe the program checks if ...
Fab's user avatar
  • 11
0 votes
0 answers
95 views

Found that when you halt your C++ program from Xcode using "Stop Debugging", your atexit function gets skipped Any way to do this, especially when debugging an iOS app?
bobobobo's user avatar
  • 68k
0 votes
1 answer
105 views

app = Flask(__name__) # AstraDB connection and vector store initialization def initialize_astra_vector_store(): cassio.init(token=ASTRA_DB_APPLICATION_TOKEN, database_id=ASTR_DB_ID) ...
0 votes
1 answer
139 views

I have registered an atexit function like this: import streamlit as st from azure.search.documents.indexes import SearchIndexClient from azure.core.credentials import AzureKeyCredential @atexit....
-1 votes
1 answer
98 views

Recently, I've been wanting to create an exit handler for my discord bot which sends an embed every time it goes offline. I found out through some quick research about the atexit module. I tried to ...
0 votes
1 answer
110 views

I have this snippet: #include <windows.h> class Conf { public: Conf(int i) : m_i{ i } { MessageBoxA(NULL, "Conf", "", MB_OK); } ~...
1 vote
0 answers
202 views

I am coding a discord bot in discord.py. I want it to change the role of the bot to show it's offline when the code is stopped. Here's the relevant code: import atexit, signal class MyClient(discord....
0 votes
1 answer
169 views

Description: I wonder that why does callback not called which is defined with @atexit.register at sys.exit in Python? Code 1: import atexit import sys if __name__ == '__main__': @atexit.register ...
黃奕捷's user avatar
1 vote
3 answers
241 views

I'm wondering: When you detect you need to clean up at the end of the program (excluding "end of block"), you want to "queue an exit handler" that does the cleanup at some later ...
U. Windl's user avatar
  • 4,804
4 votes
0 answers
51 views

I am trying to make AppBundler more observable and have had great success except for one thing. JLI_Launch does not return to the caller so I can't tell if it fails to load the main class (or any ...

15 30 50 per page
1
2 3 4 5
...
12

AltStyle によって変換されたページ (->オリジナル) /