forked from premiere/premiere-libtorrent
fixed memory leak in disk io thread when not using the cache
This commit is contained in:
parent
62a7946968
commit
3df15ad39e
|
@ -61,6 +61,7 @@ release 0.14.5
|
|||
* fixed bug when handling malformed webseed urls and an http proxy
|
||||
* fixed bug when setting unlimited upload or download rates for torrents
|
||||
* fix to make torrent_status::list_peers more accurate.
|
||||
* fixed memory leak in disk io thread when not using the cache
|
||||
|
||||
release 0.14.4
|
||||
|
||||
|
|
|
@ -1608,6 +1608,7 @@ namespace libtorrent
|
|||
test_error(j);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
// we've now inserted the buffer
|
||||
|
|
|
@ -88,6 +88,8 @@ void test_transfer(boost::intrusive_ptr<torrent_info> torrent_file, int proxy)
|
|||
float rate_sum = 0.f;
|
||||
float ses_rate_sum = 0.f;
|
||||
|
||||
cache_status cs;
|
||||
|
||||
for (int i = 0; i < 30; ++i)
|
||||
{
|
||||
torrent_status s = th.status();
|
||||
|
@ -95,7 +97,7 @@ void test_transfer(boost::intrusive_ptr<torrent_info> torrent_file, int proxy)
|
|||
rate_sum += s.download_payload_rate;
|
||||
ses_rate_sum += ss.payload_download_rate;
|
||||
|
||||
cache_status cs = ses.get_cache_status();
|
||||
cs = ses.get_cache_status();
|
||||
if (cs.blocks_read < 1) cs.blocks_read = 1;
|
||||
if (cs.blocks_written < 1) cs.blocks_written = 1;
|
||||
|
||||
|
@ -121,6 +123,9 @@ void test_transfer(boost::intrusive_ptr<torrent_info> torrent_file, int proxy)
|
|||
test_sleep(1000);
|
||||
}
|
||||
|
||||
TEST_CHECK(cs.cache_size == 0);
|
||||
TEST_CHECK(cs.total_used_buffers == 0);
|
||||
|
||||
std::cerr << "total_size: " << total_size
|
||||
<< " rate_sum: " << rate_sum
|
||||
<< " session_rate_sum: " << ses_rate_sum
|
||||
|
|
Loading…
Reference in New Issue