Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Memory Leak Question

0 views
Skip to first unread message

Francis

unread,
May 31, 2001, 11:29:21 AM5/31/01
to
What happens to a memory leak after an application ends?
Does the memory get freed or is it lost until reboot or something?


Emil Christopher Melar

unread,
May 31, 2001, 11:53:04 AM5/31/01
to
its lost until reboot.
It will be a memory hole that doesnt allow other apps writing to it of the
size you allocated!
--
Emil Chr. Melar


Randy Charles Morin

unread,
May 31, 2001, 1:30:10 PM5/31/01
to
The process memory is freed. Shared memory like memory maps are not
necessarily freed.
--
Randy Charles Morin
Author of Programming Windows Services
http://www.kbcafe.com

"Francis" <Fra...@delcohome.com> wrote in message
news:2d0701c0e9e6$774849f0$a5e62ecf@tkmsftngxa07...

Lordy

unread,
May 31, 2001, 1:39:16 PM5/31/01
to
> its lost until reboot.
> It will be a memory hole that doesnt allow other apps writing to
> it of the size you allocated!

Would I be right in saying that in a program just using standard
declarations (CStrings, CSTringArrays, etc) memory leaks don't have to be
worried about ?


--
Lordy

Emil Christopher Melar

unread,
May 31, 2001, 2:47:39 PM5/31/01
to
"Lordy" <sp...@recycle.bin> wrote in message
news:MPG.15809220d...@news.ntlworld.com...

> declarations (CStrings, CSTringArrays, etc) memory leaks don't have to be
> worried about ?

Its not a big deal I think, I think those strings allocates and frees memory
on their own... but it might be smart emptying the CString string at end of
the execution, when you dont need it anymore... Maybe I am wrong about the
allocation, because I dont use CString, and I have never looked deeply into
the class, and I always use small, small strings like a matter of 40
bytes.... it could cause some problems on a server with the program exiting
and executing every minute for 4 years without reboot :)

--
Emil Chr. Melar


M. Shokuie Nia

unread,
Jun 1, 2001, 3:02:14 AM6/1/01
to
Hi Lordy,

You can't think of memory managed by classes such as CString, they are a bit
more careful about these concepts than we are.They allocate memery
themselves and at the end deallocate it, dont worry about the built in
classes and focus on the codes you are writing.

Good Luck,
--
M. Shokuie Nia,
MSVC++ Programmer,
EMail : sho...@hotmail.com

Lordy <sp...@recycle.bin> wrote in message
news:MPG.15809220d...@news.ntlworld.com...

0 new messages