N
Noah Roberts
I have code that looks like the following:
void f()
{
Object * p = 0;
Object * p2 = availableptr;
Object * iter = 0;
std::map<int,int> serialMap;
// also tried std::map<int,int> serialMap = std::map<int,int>() even
though I can't fathom what happened the first way.
....
}
The serial map variable has an address until it reaches the point of
execute code where it is initialized...then it becomes a null
reference!!! In other words, &serialMap == 0 after the line that
declares/defines it!
All I can say is WTF?
I have never seen anything like this nor do I think I could replicate
it in code to post here. Has anyone seen this happen before? Any idea
what I am looking for?
void f()
{
Object * p = 0;
Object * p2 = availableptr;
Object * iter = 0;
std::map<int,int> serialMap;
// also tried std::map<int,int> serialMap = std::map<int,int>() even
though I can't fathom what happened the first way.
....
}
The serial map variable has an address until it reaches the point of
execute code where it is initialized...then it becomes a null
reference!!! In other words, &serialMap == 0 after the line that
declares/defines it!
All I can say is WTF?
I have never seen anything like this nor do I think I could replicate
it in code to post here. Has anyone seen this happen before? Any idea
what I am looking for?