Highlighted
Absent Member.
Absent Member.
540 views

How is thread memory released?

[Migrated content. Thread originally posted on 22 December 2011]

I have an utility program, say A, with various entry points. To make these entry points available from any program without requiring to do an explicit call to A, i call A in a program that is surely run before all other programs and then never cancel A.

When a program, say B, is called in thread and tries to call an entry point of A it gives error, as the new thread doesn't have access to the main instance of A. So, in B i explicitly call A but i can't cancel it because B could also be called not in thread.

The question is, when a thread is stopped and its memory released, do all subprograms called in it are automatically cancelled or not?

Thank you in advance
Luca
0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: How is thread memory released?

I believe the sub programs are automatically cancelled. To test you can Stop the B thread, call it again, and see if A is still in the state it was in before B stopped.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.