multithreading - Is this really returning a local addess? -


I have some code that creates a synchronized queue that I use to use data in a data gathering class I use The method that creates a queue is kicking a warning:

  line %% datagram :: addOutputQueue () {Queue ^ outputQueue = que :: Synchronize (gcn queue); AddOutputQueue (outputQueue); Return output queue; }  

1>. DataGatherer.cpp (21): Warning C4172: Local variable or temporary back address

Is this a warning: Should I be worried about this matter or am I in this case safe and this Just confusing queue :: synchronized to the compiler Queue ^ is returning? The code runs fine, but the warnings bother me; -)

Q ^% indicates that the handle is passed by reference going. However, the handle inside the funk is a local variable which can not be passed by reference because it is probably destroyed when the function is finished. Remove % from return type and you're okay.

EDIT: This does not mean that your code is not anything to work on. It can stop it from happening at any time.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -