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.
-Troy.
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: [email protected]
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
_______________________________________________
sword-devel mailing list: [email protected]
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page