15,900,815 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by nicklowe (Top 5 by date)
nicklowe
5-Jan-12 12:36pm
View
Deleted
Since you've suggested that, I started a blog off and have posted my first article on this very topic: http://www.nicklowe.org/2012/01/thread-termination-dont-leak-the-stack/
Regards,
Nick
nicklowe
4-Jan-12 22:35pm
View
Deleted
RtlFreeUserThreadStack is also available in Server 2003 (NT 5.2), not just Windows XP (NT 5.1) and prior.
In production code, its always good practice to always check the return values for all the APIs called.
nicklowe
4-Jan-12 20:31pm
View
Deleted
Reason for my vote of 4
Nearly correct, but needs to suspend the thread before freeing its usermode stack and check the return of the API that frees the stack.
nicklowe
4-Jan-12 20:28pm
View
Deleted
The return type for RtlFreeUserThreadStack is NTSTATUS and not VOID so you should check it for success.
You should also suspend the thread with SuspendThread before freeing its usermode stack.
Checking for STILL_ACTIVE is not necessary.
Regards,
Nick Lowe
nicklowe
4-Jan-12 20:01pm
View
Deleted
The return type for RtlFreeUserThreadStack is NTSTATUS and not VOID so you probably should check it for success.