Re: [Deinterlace-discuss] Bugs in scheduling code
Brought to you by:
adcockj,
dschmelzer
|
From: Radoslav M. <rad...@se...> - 2007-03-01 15:08:24
|
If there are multiple objects created it shouldn't be problem becouse
strcpy always copy new string to that static array.
Anyway I saw this technique of returning arrays somewhere in Dscaler
code that is not mine....I wonder if you checked that too.
Cheers
-----Original Message-----
From: dei...@li...
[mailto:dei...@li...] On Behalf Of
Rob Muller
Sent: Thursday, March 01, 2007 12:24 AM
To: dei...@li...
Subject: Re: [Deinterlace-discuss] Bugs in scheduling code
At 12:20 24-02-07, Radoslav Masaryk wrote:
[new patch, dated 02-24-07]
Code from the new patch:
------------------------------------
char* CSchedule::getTimeStr() const
{
static char chTime[6];
strcpy(chTime,m_time_start.Format("%H:%M").GetBuffer());
return chTime;
}
------------------------------------
No more memory leaks but what if multiple objects are created? (There
is only one static variable.)
Rob
------------------------------------------------------------------------
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your opinions on IT & business topics through brief surveys-and earn
cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
V
_______________________________________________
Deinterlace-discuss mailing list
Dei...@li...
https://lists.sourceforge.net/lists/listinfo/deinterlace-discuss
|