Click here to Skip to main content
15,917,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
General2 DirectX questions Pin
Cedric Moonen18-Oct-04 20:26
Cedric Moonen18-Oct-04 20:26 
Questionhow can i used this struct. Pin
maranatha18-Oct-04 20:26
maranatha18-Oct-04 20:26 
AnswerRe: how can i used this struct. Pin
bryce18-Oct-04 20:36
bryce18-Oct-04 20:36 
AnswerRe: how can i used this struct. Pin
Cedric Moonen18-Oct-04 20:47
Cedric Moonen18-Oct-04 20:47 
GeneralRe: how can i used this struct. Pin
Anonymous19-Oct-04 14:41
Anonymous19-Oct-04 14:41 
AnswerRe: how can i used this struct. Pin
David Crow19-Oct-04 2:52
David Crow19-Oct-04 2:52 
GeneralRe: how can i used this struct. Pin
Anonymous19-Oct-04 14:39
Anonymous19-Oct-04 14:39 
GeneralRe: how can i used this struct. Pin
David Crow20-Oct-04 3:00
David Crow20-Oct-04 3:00 
You must've missed my point. In your code snippet, you are assigning a new value to ptest->sztext and ptest->pptest->sztext 100,000 times. With only two deletes outside of the for loop, you are going to have 199,998 memory leaks of 1024 bytes each, or roughly 195.3MB! Make sense?

Anonymous wrote:
and my situation is must be storing in struct.

It matters not what you are allocating the memory for (e.g., struct, object, int, array). It's a simple matter of having one delete for each new.


"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow


GeneralTab control with mdi Pin
vc-programmer-18-Oct-04 19:27
vc-programmer-18-Oct-04 19:27 
GeneralMDI with check control Pin
vc-programmer-18-Oct-04 19:21
vc-programmer-18-Oct-04 19:21 
GeneralRe: MDI with check control Pin
Sujan Christo18-Oct-04 19:56
Sujan Christo18-Oct-04 19:56 
QuestionDirectshow - can a filter detect that the user is currently seeking? Pin
Indrawati18-Oct-04 19:15
Indrawati18-Oct-04 19:15 
GeneralAdvice required Pin
Imtiaz Murtaza18-Oct-04 19:04
Imtiaz Murtaza18-Oct-04 19:04 
GeneralRe: Advice required Pin
shiraztk18-Oct-04 19:24
shiraztk18-Oct-04 19:24 
GeneralRe: Advice required Pin
bryce18-Oct-04 20:37
bryce18-Oct-04 20:37 
GeneralRe: Advice required Pin
Imtiaz Murtaza18-Oct-04 20:42
Imtiaz Murtaza18-Oct-04 20:42 
GeneralRe: Advice required Pin
Henry miller19-Oct-04 3:56
Henry miller19-Oct-04 3:56 
QuestionHow to create true type font Pin
Azghar Hussain18-Oct-04 18:59
professionalAzghar Hussain18-Oct-04 18:59 
AnswerRe: How to create true type font Pin
22491718-Oct-04 21:37
22491718-Oct-04 21:37 
GeneralTab order in Win32 App Pin
Murlai18-Oct-04 18:51
Murlai18-Oct-04 18:51 
GeneralRe: Tab order in Win32 App Pin
22491718-Oct-04 21:42
22491718-Oct-04 21:42 
GeneralRe: Tab order in Win32 App Pin
Murlai19-Oct-04 0:16
Murlai19-Oct-04 0:16 
GeneralRe: Tab order in Win32 App Pin
22491719-Oct-04 1:12
22491719-Oct-04 1:12 
GeneralRe: Tab order in Win32 App Pin
Phil J Pearson19-Oct-04 3:54
Phil J Pearson19-Oct-04 3:54 
Generalplease please help me its urgent Pin
youngashish18-Oct-04 18:38
youngashish18-Oct-04 18:38 

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.