I am wondering if i new some object but forget to delete it, when the process exit, will the leaked memory be returned to the OS?
What is the difference between interrupt and an event?
I am wondering if i new some object but forget to delete it, when the process exit, will the leaked memory be returned to the OS?
This isn t so mush a C++ question as an operating system question.
All of the operating systems that I have knowledge of will reclaim conventional memory that had been allocated. That s because the allocation generally comes from a processes private address space which will be reclaimed on exit.
This may not be true for other resources such as shared memory. There are implementations that will not release shared memory segments unless you specifically mark them for deletion before your process exits (and, even then, they don t get deleted until everyone has detached).
For most modern operating systems (most flavors of unix and anything running in protected memory under x86), the memory allocation occurs within a program s heap (either through malloc for C or new/delete for C++). So when the program exits, then the memory will be released for use elsewhere.
What is the difference between interrupt and an event?
Recently, I have been asked a question in an interview what s the difference between a process and a thread. Really, I did not know the answer. I thought for a minute and gave a very weird answer. ...
This relates to some software I ve been given to "fix". The easiest and quickest solution would make it open and read 10 random files out of hundreds and extract some very short strings for processing ...
I know DLL contains one or more exported functions that are compiled, linked, and stored separately.. My question is about not about how to create it.. but it is all about in what form it is stored.. ...
I am wondering if i new some object but forget to delete it, when the process exit, will the leaked memory be returned to the OS?
Does the threads of a single process run in parallel on a multi-core machine on windows XP? Is the behavior same on different windows versions (windows server editions) I have heard that only threads ...
What are some of the major pro/con of FreeBSD vs GNU Linux vs OpenSolaris? Which is the best operating system to program/develop against?
How can I check OS version in a batch file or through a vbs in an Windows 2k/2k3 environment ? You know ... Something like ... : "If winver Win2k then ... or if winver Win2k3 then ....