Click here to Skip to main content
15,887,676 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: IUnknown interface Pin
George_George13-Sep-08 23:09
George_George13-Sep-08 23:09 
GeneralRe: IUnknown interface Pin
CPallini13-Sep-08 23:45
mveCPallini13-Sep-08 23:45 
GeneralRe: IUnknown interface Pin
George_George14-Sep-08 0:09
George_George14-Sep-08 0:09 
AnswerRe: IUnknown interface Pin
Hamid_RT14-Sep-08 0:16
Hamid_RT14-Sep-08 0:16 
GeneralRe: IUnknown interface Pin
George_George14-Sep-08 0:19
George_George14-Sep-08 0:19 
GeneralRe: IUnknown interface Pin
Hamid_RT14-Sep-08 0:33
Hamid_RT14-Sep-08 0:33 
GeneralRe: IUnknown interface Pin
George_George14-Sep-08 1:52
George_George14-Sep-08 1:52 
QuestionUnusual memory leak ( code attached ) Pin
Yanshof13-Sep-08 20:12
Yanshof13-Sep-08 20:12 
I have some memory leak in my code.
In my application i have some method that called every 5 seconds - and i found that my memory leak is in this method.
The leak increase the memory for 4kb every 5-10 seconds.

Attached the part of the code that i found that causing the memory leak.

void foo(const VARIANT FAR& Var1, const VARIANT FAR& Var2, const VARIANT FAR& Var3)
{
	COleSafeArray SafeV1, SafeV2, SafeV3;
	SafeV1 = Var1;
	SafeV2 = Var2;
	SafeV3 = Var3;
		
	int iNumObjs = SafeV1.GetOneDimSize();
	COleVariant vV1, vV2, vV3;
	for ( long i = 0 ; i < iNumObjs ; i++ )
	{
		CString  TempV1,Value;

		SafeV1.GetElement(&i, &vV1);
		TempV1 = vV1.bstrVal;
		
		SafeV2.GetElement(&i, &vV2);
		
		SafeV3.GetElement(&i, &vV3);
		Value = vV3.bstrVal;	
	}
}

AnswerRe: Unusual memory leak ( code attached ) Pin
CPallini13-Sep-08 23:19
mveCPallini13-Sep-08 23:19 
GeneralRe: Unusual memory leak ( code attached ) Pin
Yanshof13-Sep-08 23:32
Yanshof13-Sep-08 23:32 
GeneralRe: Unusual memory leak ( code attached ) Pin
CPallini13-Sep-08 23:58
mveCPallini13-Sep-08 23:58 
GeneralRe: Unusual memory leak ( code attached ) Pin
Yanshof14-Sep-08 0:04
Yanshof14-Sep-08 0:04 
QuestionRe: Unusual memory leak ( code attached ) Pin
CPallini14-Sep-08 0:32
mveCPallini14-Sep-08 0:32 
AnswerRe: Unusual memory leak ( code attached ) Pin
Yanshof14-Sep-08 0:35
Yanshof14-Sep-08 0:35 
QuestionRe: Unusual memory leak ( code attached ) Pin
CPallini14-Sep-08 4:09
mveCPallini14-Sep-08 4:09 
QuestionAfxOleInit called OleInitialize inside, but no AfxOleUninit Pin
followait13-Sep-08 17:32
followait13-Sep-08 17:32 
AnswerRe: AfxOleInit called OleInitialize inside, but no AfxOleUninit Pin
CPallini14-Sep-08 6:41
mveCPallini14-Sep-08 6:41 
Questionwarning C4244 ... conversion from 'int' to 'char', possible loss of data Pin
FrankMookie13-Sep-08 16:04
FrankMookie13-Sep-08 16:04 
QuestionRe: warning C4244 ... conversion from 'int' to 'char', possible loss of data Pin
Mark Salsbery13-Sep-08 16:11
Mark Salsbery13-Sep-08 16:11 
AnswerRe: warning C4244 ... conversion from 'int' to 'char', possible loss of data Pin
FrankMookie13-Sep-08 16:14
FrankMookie13-Sep-08 16:14 
GeneralRe: warning C4244 ... conversion from 'int' to 'char', possible loss of data Pin
bob1697214-Sep-08 8:06
bob1697214-Sep-08 8:06 
GeneralRe: warning C4244 ... conversion from 'int' to 'char', possible loss of data Pin
FrankMookie14-Sep-08 8:09
FrankMookie14-Sep-08 8:09 
GeneralRe: warning C4244 ... conversion from 'int' to 'char', possible loss of data Pin
bob1697214-Sep-08 10:25
bob1697214-Sep-08 10:25 
AnswerRe: warning C4244 ... conversion from 'int' to 'char', possible loss of data Pin
CPallini13-Sep-08 21:04
mveCPallini13-Sep-08 21:04 
GeneralRe: warning C4244 ... conversion from 'int' to 'char', possible loss of data Pin
FrankMookie14-Sep-08 7:48
FrankMookie14-Sep-08 7:48 

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.