Threads and AllocateMemory
Posted: Mon Mar 20, 2023 8:32 pm
In the docs it mentions that any memory allocated with AllocateMemory will be freed when the program ends. Of course instead we'll use FreeMemory when done with buffer. But I'm having some problems with AllocateMemory, pointers, and threads, all tangled together. Question:
If a procedure is launched as a new thread (CreateThread), and in that procedure AllocateMemory is used to create a buffer, and then the procedure (and thread) ends, is the buffer still allocated? Or was the memory released by PB when the thread ended?
If a procedure is launched as a new thread (CreateThread), and in that procedure AllocateMemory is used to create a buffer, and then the procedure (and thread) ends, is the buffer still allocated? Or was the memory released by PB when the thread ended?