[sword-devel] ListKey issue (bug?)

Troy A. Griffitts scribe at crosswire.org
Sun May 17 17:40:04 MST 2009

Again, the details with this, if interested are:

results++ mandates increment then return of a temporary which 
represented the object before the increment.

You are assigning your retval to the internal text value of this 
temporary, which goes out of scope immediately after the assignment 
(calling the d-tor and thus freeing the memory).

Hope this helps.


Matthew Talbert wrote:
> It turns out that if we use ++results instead of results++ we don't
> have a problem. So it would seem that there is still something funny
> going on.
> Nevertheless we will not count on the result persisting.
> Matthew
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

More information about the sword-devel mailing list