Click here to Skip to main content
16,015,097 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multi Monitor and StretchDIBits Pin
Jay Carter22-Feb-05 5:58
Jay Carter22-Feb-05 5:58 
GeneralRe: Multi Monitor and StretchDIBits Pin
Blake Miller22-Feb-05 6:34
Blake Miller22-Feb-05 6:34 
GeneralRe: Multi Monitor and StretchDIBits Pin
Jay Carter22-Feb-05 22:45
Jay Carter22-Feb-05 22:45 
Generaltitle bar color Pin
wasife21-Feb-05 23:54
wasife21-Feb-05 23:54 
GeneralRe: title bar color Pin
Muhammad Azam22-Feb-05 0:06
Muhammad Azam22-Feb-05 0:06 
GeneralRe: title bar color Pin
RChin22-Feb-05 0:22
RChin22-Feb-05 0:22 
GeneralRe: title bar color Pin
Roger Allen22-Feb-05 0:41
Roger Allen22-Feb-05 0:41 
GeneralLVITEM memory leak Pin
ralfeus21-Feb-05 23:36
ralfeus21-Feb-05 23:36 
Hi, all
I'm adding items to the list control:
for (i = 0; i < pDoc->GetSize(); i++)
{
LV_ITEM lvi;
CMovieData* pMovie = pDoc->GetMovie (i);
lvi.mask = LVIF_TEXT | LVIF_PARAM;
lvi.iItem = i;
lvi.iSubItem = 0;
lvi.pszText = new TCHAR[]; // this line is 63
_tcscpy (lvi.pszText, pMovie->Name);
movList.InsertItem (&lvi);

lvi.mask = LVIF_TEXT;
lvi.iImage = i;
lvi.iSubItem = 1;
_tcscpy (lvi.pszText, pMovie->GetGenre());
movList.SetItem (&lvi);
}

After program stopping I get a message:
Detected memory leaks!
Dumping objects ->
d:\temp\projects\movies\moviesview.cpp(63) : {334} normal block at 0x00376190, 0 bytes long.
Data: <>
d:\temp\projects\movies\moviesview.cpp(63) : {333} normal block at 0x00379DD0, 0 bytes long.
Data: <>
{90} normal block at 0x00372D10, 24 bytes long.
Data: < 2| > D8 9C 32 7C 07 00 00 00 07 00 00 00 01 00 00 00
d:\temp\projects\movies\moviesdoc.cpp(44) : {87} normal block at 0x00372848, 4 bytes long.
Data: < -7 > 20 2D 37 00
Object dump complete.

The 63 line I've marked. Is it possible to delete in some way the strings? Thanks.
GeneralRe: LVITEM memory leak Pin
RChin22-Feb-05 0:45
RChin22-Feb-05 0:45 
GeneralRe: LVITEM memory leak Pin
ralfeus22-Feb-05 2:25
ralfeus22-Feb-05 2:25 
GeneralRe: LVITEM memory leak Pin
RChin22-Feb-05 3:00
RChin22-Feb-05 3:00 
GeneralRe: LVITEM memory leak Pin
Tim Smith22-Feb-05 4:09
Tim Smith22-Feb-05 4:09 
Questionarabic in menu? Pin
Anonymous21-Feb-05 21:51
Anonymous21-Feb-05 21:51 
AnswerRe: arabic in menu? Pin
ThatsAlok21-Feb-05 22:14
ThatsAlok21-Feb-05 22:14 
GeneralIterate view Pin
Yulianto.21-Feb-05 19:23
Yulianto.21-Feb-05 19:23 
GeneralRe: Iterate view Pin
Blake Miller22-Feb-05 4:51
Blake Miller22-Feb-05 4:51 
GeneralRe: Iterate view Pin
Yulianto.22-Feb-05 14:26
Yulianto.22-Feb-05 14:26 
GeneralRe: Iterate view Pin
Blake Miller23-Feb-05 3:56
Blake Miller23-Feb-05 3:56 
GeneralRe: Iterate view Pin
Yulianto.23-Feb-05 14:49
Yulianto.23-Feb-05 14:49 
QuestionWhat are the differences between ordinary variables, references and pointer variables? Pin
jahfer21-Feb-05 19:13
jahfer21-Feb-05 19:13 
AnswerRe: What are the differences between ordinary variables, references and pointer variables? Pin
Ravi Bhavnani22-Feb-05 2:04
professionalRavi Bhavnani22-Feb-05 2:04 
GeneralTwo Dimensional Array using Vector Class Pin
OutlawTornNMT21-Feb-05 18:52
OutlawTornNMT21-Feb-05 18:52 
GeneralRe: Two Dimensional Array using Vector Class Pin
Kevin McFarlane22-Feb-05 2:14
Kevin McFarlane22-Feb-05 2:14 
GeneralRelease Handle Pin
SoftEngi21-Feb-05 18:37
SoftEngi21-Feb-05 18:37 
GeneralToolbar in ActiveX Control Pin
Anand for every one21-Feb-05 18:35
Anand for every one21-Feb-05 18:35 

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.