|
|
#1 |
|
Value stored to 'dwDelay' is never read
Hi
The function below is causing me memory leak. I dont know why. I'm using dwDelay but its telling me dwDelay is never read.What mistake am i doing here. Code:
-(uint8_t)timeoutThread
{
unsigned long int dwDelay = 0;
some stmts;
while()
{
stmts;
}
dwDelay = 1000; //memory leak(value stored to 'dwDelay' is never read)
}
Last edited by rbeatajane; Jun 16, 2011 at 03:28 AM. |
|
|
|
0
|
|
|
#2 |
|
I don't see how that will leak memory: dwDelay is a stack variable. It's not storing a pointer to something on the heap so at the end of the method it's storage will automatically be recovered from the stack. The analyser is correct though: that last statement has no point as the value can never be read.
__________________
Sponsor me to cycle 100Km round London in the dark |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| How To: Use your iPhone to store your documents for later reading! - Very Useful | dharrison9 | iPhone Tips, Help and Troubleshooting | 19 | Jun 30, 2012 08:47 AM |
| How to Make Sure a File is Never Replaced? | thriii | Mac OS X | 13 | Nov 24, 2009 12:41 PM |
| iPhone Book: we'll never read one of it ! | fa.ce | iPhone/iPad Programming | 1 | Sep 25, 2008 04:22 PM |
| Is it possible to restore phone to 2.0? (please read entire question) | BobboZR2 | iPhone | 4 | Aug 9, 2008 03:48 PM |
| I think I just found an iPhone feature I've never read on the net...Anywhere. | Vegeta-san | iPhone | 29 | Nov 22, 2007 10:41 AM |
All times are GMT -5. The time now is 11:52 PM.






Linear Mode

