Click here to Skip to main content
16,005,491 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Time delay Pin
Garth J Lancaster16-Sep-07 12:52
professionalGarth J Lancaster16-Sep-07 12:52 
GeneralRe: Time delay Pin
pourang16-Sep-07 23:14
pourang16-Sep-07 23:14 
AnswerRe: Time delay Pin
David Crow17-Sep-07 3:08
David Crow17-Sep-07 3:08 
GeneralRe: Time delay Pin
pourang17-Sep-07 6:28
pourang17-Sep-07 6:28 
Questionerror message meaning Pin
jada092316-Sep-07 10:32
jada092316-Sep-07 10:32 
AnswerRe: error message meaning Pin
Michael Dunn16-Sep-07 15:59
sitebuilderMichael Dunn16-Sep-07 15:59 
QuestionRe: error message meaning Pin
David Crow17-Sep-07 3:11
David Crow17-Sep-07 3:11 
QuestionMemory leaks with malloc/realloc . . . Pin
madpuppy16-Sep-07 6:31
madpuppy16-Sep-07 6:31 
Dear kind peoples, I am working on a project and have been having a hard time getting rid of these
memory leaks here. Could someone tell me what I am doing wrong?

CASE #1
#define MAX_DICT 4096

Lzss::Lzss( void)
{
m_pDad = ( int *) ::malloc( ( 3 * ( MAX_DICT + 1) + 256) * sizeof( int));
}

Lzss::~Lzss( void)
{
free( m_pDad);
}

CASE #2
typedef struct s_PageDesc
{
.....;
LPDIRECT3DTEXTURE8 pTexture;
....;
} DXARTPAGEDESC,*LPDXARTPAGEDESC;

LPDXARTPAGEDESC m_pPageDesc;
UINT m_uMax; // number of pages

----Created Here----
m_pPageDesc = (LPDXARTPAGEDESC) realloc (m_pPageDesc, m_uMax * sizeof(DXARTPAGEDESC));
....

----Destructor----
for (UINT i = 0; i < m_uMax; ++i)
{
SAFE_RELEASE (m_pPageDesc[i].pTexture);
}

free (m_pPageDesc);
m_pPageDesc = NULL;
AnswerRe: Memory leaks with malloc/realloc . . . Pin
Mark Salsbery16-Sep-07 7:45
Mark Salsbery16-Sep-07 7:45 
GeneralRe: Memory leaks with malloc/realloc . . . Pin
DevMentor.org17-Sep-07 4:47
DevMentor.org17-Sep-07 4:47 
GeneralRe: Memory leaks with malloc/realloc . . . Pin
Mark Salsbery17-Sep-07 6:42
Mark Salsbery17-Sep-07 6:42 
Questionmessage-handler function for popup menu created at runtime Pin
blackbondi16-Sep-07 5:40
blackbondi16-Sep-07 5:40 
AnswerRe: message-handler function for popup menu created at runtime Pin
Abdellatif_El_Khlifi23-Sep-07 13:02
Abdellatif_El_Khlifi23-Sep-07 13:02 
QuestionCStatic usage of bitmaps... Pin
charlieg16-Sep-07 3:20
charlieg16-Sep-07 3:20 
AnswerRe: CStatic usage of bitmaps... Pin
Mark Salsbery16-Sep-07 7:57
Mark Salsbery16-Sep-07 7:57 
GeneralRe: CStatic usage of bitmaps... Pin
charlieg16-Sep-07 9:28
charlieg16-Sep-07 9:28 
QuestionCan I construct CBitmap from heap Pin
m1m216-Sep-07 1:21
m1m216-Sep-07 1:21 
AnswerRe: Can I construct CBitmap from heap Pin
Mark Salsbery16-Sep-07 8:01
Mark Salsbery16-Sep-07 8:01 
GeneralRe: Can I construct CBitmap from heap Pin
m1m216-Sep-07 10:31
m1m216-Sep-07 10:31 
Questionundefined reference to `InitCommonControlsEx@4' ERROR Pin
$w0rdf1$h16-Sep-07 0:54
$w0rdf1$h16-Sep-07 0:54 
AnswerRe: undefined reference to `InitCommonControlsEx@4' ERROR Pin
$w0rdf1$h16-Sep-07 1:53
$w0rdf1$h16-Sep-07 1:53 
Questionunwanted exit of program Pin
Member 439909416-Sep-07 0:20
Member 439909416-Sep-07 0:20 
Questionhow can I clear overlay after using transparentblt Pin
gurucplusplus15-Sep-07 19:17
gurucplusplus15-Sep-07 19:17 
AnswerRe: how can I clear overlay after using transparentblt Pin
Mark Salsbery16-Sep-07 8:12
Mark Salsbery16-Sep-07 8:12 
GeneralRe: how can I clear overlay after using transparentblt Pin
gurucplusplus16-Sep-07 17:31
gurucplusplus16-Sep-07 17:31 

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.