Thread View: comp.os.msdos.programmer
2 messages
2 total messages
Started by Neal Sanche
Tue, 05 Jan 1993 22:57
BC++ TV Stream Manager..
Author: Neal Sanche
Date: Tue, 05 Jan 1993 22:57
Date: Tue, 05 Jan 1993 22:57
19 lines
972 bytes
972 bytes
I would like to know why the BC++ Turbo Vision stream manager causes memory losses every time I instantiate a TResourceFile object and then immediately destroy it? Is there something that the TV Stream manager does behind the scenes that cause it to reserve memory for itself and then not deallocate it? Any insight would be appreciated. I'd like to know how the stream manager works to be assured that I'm not going to eventually run out of heap memory whenever objects are read from and written to streams. -Neal ... OFFLINE 1.41 * Live from New York... * Origin: Paradigm BBS: A programmer's paradise. (42:100/11)
Re: BC++ TV Stream Manager..
Author: Harry Miller
Date: Mon, 11 Jan 1993 18:11
Date: Mon, 11 Jan 1993 18:11
34 lines
1992 bytes
1992 bytes
Neal.Sanche@ttlg.UUCP (Neal Sanche) writes: >I would like to know why the BC++ Turbo Vision stream manager causes >memory losses every time I instantiate a TResourceFile object and then >immediately destroy it? > >Is there something that the TV Stream manager does behind the scenes >that cause it to reserve memory for itself and then not deallocate >it? > >Any insight would be appreciated. I'd like to know how the stream manager >works to be assured that I'm not going to eventually run out of heap >memory whenever objects are read from and written to streams. > >-Neal > Make sure the allocation routine is not reserving the memory for future use. Many allocation schemes do this to improve performance. The functions coreleft and farcoreleft, will not report this saved memory, you need to use the heap functions to find this saved memory. I've never done this myself, but I have seen some code to do this. Another consideration: Is the instantiation (sp?) of your TResourceFile class the very first instantiation (there's that word again). If it is, your memory loss may be from the stream manager's initialization of your streamable class. I do not think the ste stream manager releases this memory, in case it might be needed later on. Well, a few thought to look at (how do you see thoughts!). Harry E. Miller ----------------- just a jerk lurking on the net hmiller@osiris.cso.uiuc.edu ----- where to send the hate mail
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads