Open GoogleCodeExporter opened 9 years ago
Does this patch solve the problem for you? It makes alerts be held by a smart
pointer. I'm assuming you don't actually need to copy the object, since it's
immutable anyway.
Original comment by arvid.no...@gmail.com
on 25 Jun 2013 at 10:40
Attachments:
Currently, alert objects of the same type are reused (I detected this problem
queuing alerts for parallelization), making alert objects immutable effectively
solves the problem in a pythonic way.
Thanks.
Original comment by fel...@mp2p.net
on 27 Jun 2013 at 7:52
reused? You mean two alerts of the same type always have the same value?
Original comment by arvid.no...@gmail.com
on 28 Jun 2013 at 3:13
I mean two consecutive session::pop_alert() calls, returning alerts of the same
type (tested with torrent_alerts) causes the first alert's data became
overwritten with second's one.
Original comment by fel...@mp2p.net
on 2 Jul 2013 at 2:38
I wonder if this is because the first one goes out of scope somehow, and the
heap allocator decides to pick the same memory for the next alert.
Is this with out without the patch btw? or does it not matter?
The patch makes the alert be held by a shared_ptr, and may affect this.
Original comment by arvid.no...@gmail.com
on 3 Jul 2013 at 4:43
Original issue reported on code.google.com by
fel...@mp2p.net
on 24 Jun 2013 at 12:56