Click here to Skip to main content
15,914,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Lose window focus? Pin
Dominik Reichl25-Mar-05 6:36
Dominik Reichl25-Mar-05 6:36 
GeneralRe: Lose window focus? Pin
PJ Arends25-Mar-05 7:17
professionalPJ Arends25-Mar-05 7:17 
GeneralRe: Lose window focus? Pin
Dominik Reichl25-Mar-05 8:20
Dominik Reichl25-Mar-05 8:20 
GeneralRe: Lose window focus? Pin
David Crow25-Mar-05 5:18
David Crow25-Mar-05 5:18 
GeneralRe: Lose window focus? Pin
Dominik Reichl25-Mar-05 5:47
Dominik Reichl25-Mar-05 5:47 
GeneralSmth. like firewall Pin
Static(x)24-Mar-05 23:24
Static(x)24-Mar-05 23:24 
GeneralRe: Smth. like firewall Pin
MMansonFan2529-Mar-05 23:27
MMansonFan2529-Mar-05 23:27 
GeneralMemory Problem on CPtrArray Pin
Nobitact24-Mar-05 23:17
Nobitact24-Mar-05 23:17 
Hi all,

Who had worked on Pocket PC please help me!
I'm using CPtrArray to store a array of pointer(as below, it is pointer of CData class).
+ Firstly, I allocate memory for objects (using operator "new") , and add them to CPtrArray.
+ Then, I get these pointers and using "delete" operator to free allocated memory.
However, even though I freed all allocated memory, but for the frist times of runing this source on Pocket PC, memory always increase.
Of course, for next times of runing, memory is not changed.
(I monitor memory by go to "Setting\Memory")

Here is my source code:

class CData
{
public:
CData();
virtual ~CData();
private:
wstring m_strFullName;
wstring m_strNativePlace;
wstring m_strDescription;
int m_nAge;
int m_nHeight;
int m_nWeight;
bool m_bSex.
}

CPtrArray lstData;
CData * pData;
int nSize = 10000;

for (int i = 0; i < nSize; ++i)
{
lstData.Add(new CData());
}

for (i = 0; i < nSize; ++i)
{
pData = (CData*)lstData.GetAt(i);
delete pData;//free memory
}

lstData.RemoveAll();
lstData.FreeExtra();

Many thanks for your help.
GeneralRe: Memory Problem on CPtrArray Pin
Blake Miller25-Mar-05 6:40
Blake Miller25-Mar-05 6:40 
GeneralRe: Memory Problem on CPtrArray Pin
Nobitact25-Mar-05 15:17
Nobitact25-Mar-05 15:17 
GeneralRe: Memory Problem on CPtrArray Pin
Blake Miller28-Mar-05 4:05
Blake Miller28-Mar-05 4:05 
QuestionHow to write a Winsock application that captures localhost process packets Pin
covansys200024-Mar-05 23:13
covansys200024-Mar-05 23:13 
General.:: Bluetooth programming ::. (i need help) Pin
wise_8224-Mar-05 23:04
wise_8224-Mar-05 23:04 
GeneralRe: .:: Bluetooth programming ::. (i need help) Pin
toxcct25-Mar-05 1:09
toxcct25-Mar-05 1:09 
GeneralRe: .:: Bluetooth programming ::. (i need help) Pin
wise_8225-Mar-05 11:25
wise_8225-Mar-05 11:25 
GeneralRe: .:: Bluetooth programming ::. (i need help) Pin
toxcct26-Mar-05 4:36
toxcct26-Mar-05 4:36 
QuestionHow to avoid using multiple threads in winsock programming? Pin
johtib24-Mar-05 22:53
johtib24-Mar-05 22:53 
AnswerRe: How to avoid using multiple threads in winsock programming? Pin
geo_m25-Mar-05 2:26
geo_m25-Mar-05 2:26 
AnswerRe: How to avoid using multiple threads in winsock programming? Pin
RobJones25-Mar-05 6:30
RobJones25-Mar-05 6:30 
GeneralRe: How to avoid using multiple threads in winsock programming? Pin
johtib25-Mar-05 8:10
johtib25-Mar-05 8:10 
GeneralRe: How to avoid using multiple threads in winsock programming? Pin
Blake Miller28-Mar-05 4:08
Blake Miller28-Mar-05 4:08 
GeneralRe: How to avoid using multiple threads in winsock programming? Pin
johtib4-Apr-05 23:23
johtib4-Apr-05 23:23 
GeneralRe: How to avoid using multiple threads in winsock programming? Pin
Blake Miller6-Apr-05 5:09
Blake Miller6-Apr-05 5:09 
GeneralRe: How to avoid using multiple threads in winsock programming? Pin
johtib8-Apr-05 21:46
johtib8-Apr-05 21:46 
GeneralRe: How to avoid using multiple threads in winsock programming? Pin
Blake Miller11-Apr-05 5:20
Blake Miller11-Apr-05 5:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.