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

C / C++ / MFC

 
GeneralRe: Bluetooth - COM port reading Pin
Andrew Brock18-Jan-11 0:40
Andrew Brock18-Jan-11 0:40 
GeneralRe: Bluetooth - COM port reading Pin
tnt00018-Jan-11 2:43
tnt00018-Jan-11 2:43 
GeneralRe: Bluetooth - COM port reading Pin
Andrew Brock18-Jan-11 3:40
Andrew Brock18-Jan-11 3:40 
GeneralRe: Bluetooth - COM port reading Pin
tnt00018-Jan-11 5:27
tnt00018-Jan-11 5:27 
GeneralRe: Bluetooth - COM port reading Pin
Andrew Brock18-Jan-11 14:07
Andrew Brock18-Jan-11 14:07 
QuestionDifference between _stat() and _fstat() Pin
gomathylakshmanan17-Jan-11 19:47
gomathylakshmanan17-Jan-11 19:47 
AnswerRe: Difference between _stat() and _fstat() Pin
Andrew Brock17-Jan-11 19:53
Andrew Brock17-Jan-11 19:53 
QuestionCTypedPtrArray & CStringArray Pin
mesajflaviu17-Jan-11 9:10
mesajflaviu17-Jan-11 9:10 
Can you tell me if I use in corect way these classes , CTypedPtrArray & CStringArray ?

These are member variable to CMyDoc class :
typedef CTypedPtrArray<CObArray,CStringArray*> CTableArray;

class CMyDoc : public CDocument
{
// Attributes
public:
	CStringArray m_saTable;
	CTableArray m_saTables;
...
}

and here is code snipped for use of them :

m_saTable.Add("String Test");
m_saTables.Add(&m_saTable);
CStringArray* saTest = m_saTables.GetAt(0);
CString sTest = saTest->GetAt(0);
TRACE("\n %s \n",sTest);


but , where I need to delete elements ?
I try to delete items in OnCloseDocument(...)

void CMyDoc::OnCloseDocument() 
{
	// TODO: Add your specialized code here and/or call the base class

	m_saTable.RemoveAll();
	m_saTables.RemoveAll();
	TRACE("\n %d - %d \n",m_saTable.GetSize(),m_saTables.GetSize());

	CDocument::OnCloseDocument();
}

But with or without remove code , I didn't have memory leaks in debug window ... is really necesary to delete the items ?
Any help , I will appreciated ! Thanks !
AnswerRe: CTypedPtrArray & CStringArray Pin
Chris Meech17-Jan-11 10:01
Chris Meech17-Jan-11 10:01 
GeneralRe: CTypedPtrArray & CStringArray Pin
mesajflaviu17-Jan-11 19:06
mesajflaviu17-Jan-11 19:06 
AnswerRe: CTypedPtrArray & CStringArray Pin
Andrew Brock17-Jan-11 16:04
Andrew Brock17-Jan-11 16:04 
GeneralRe: CTypedPtrArray & CStringArray Pin
mesajflaviu17-Jan-11 19:38
mesajflaviu17-Jan-11 19:38 
GeneralRe: CTypedPtrArray & CStringArray Pin
Andrew Brock17-Jan-11 19:51
Andrew Brock17-Jan-11 19:51 
AnswerRe: CTypedPtrArray & CStringArray Pin
mesajflaviu17-Jan-11 22:11
mesajflaviu17-Jan-11 22:11 
GeneralRe: CTypedPtrArray & CStringArray Pin
Andrew Brock17-Jan-11 22:36
Andrew Brock17-Jan-11 22:36 
GeneralRe: CTypedPtrArray & CStringArray Pin
mesajflaviu18-Jan-11 1:47
mesajflaviu18-Jan-11 1:47 
QuestionDisplay dialog after SDI app opens Pin
David Crow17-Jan-11 3:01
David Crow17-Jan-11 3:01 
AnswerRe: Display dialog after SDI app opens Pin
Maximilien17-Jan-11 3:30
Maximilien17-Jan-11 3:30 
GeneralRe: Display dialog after SDI app opens Pin
David Crow17-Jan-11 3:39
David Crow17-Jan-11 3:39 
AnswerRe: Display dialog after SDI app opens Pin
Andrew Brock17-Jan-11 3:54
Andrew Brock17-Jan-11 3:54 
AnswerRe: Display dialog after SDI app opens Pin
David Crow17-Jan-11 8:36
David Crow17-Jan-11 8:36 
AnswerRe: Display dialog after SDI app opens Pin
Alain Rist17-Jan-11 5:48
Alain Rist17-Jan-11 5:48 
AnswerRe: Display dialog after SDI app opens Pin
PJ Arends17-Jan-11 7:51
professionalPJ Arends17-Jan-11 7:51 
QuestionImplementation of Chord DHT in ANSI C. Pin
przemnet17-Jan-11 1:42
przemnet17-Jan-11 1:42 
GeneralRe: Implementation of Chord DHT in ANSI C. Pin
CPallini17-Jan-11 2:01
mveCPallini17-Jan-11 2:01 

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.