okhttp3.ConnectionPool.pruneAndGetAllocationCount()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中okhttp3.ConnectionPool.pruneAndGetAllocationCount()方法的一些代码示例,展示了ConnectionPool.pruneAndGetAllocationCount()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ConnectionPool.pruneAndGetAllocationCount()方法的具体详情如下:
包路径:okhttp3.ConnectionPool
类名称:ConnectionPool
方法名:pruneAndGetAllocationCount

ConnectionPool.pruneAndGetAllocationCount介绍

[英]Prunes any leaked allocations and then returns the number of remaining live allocations on connection. Allocations are leaked if the connection is tracking them but the application code has abandoned them. Leak detection is imprecise and relies on garbage collection.
[中]删除所有泄漏的分配,然后返回连接上剩余的实时分配数。如果连接正在跟踪分配,但应用程序代码已放弃分配,则分配会泄漏。泄漏检测不精确,依赖于垃圾收集。

代码示例

代码示例来源:origin: square/okhttp

if (pruneAndGetAllocationCount(connection, now) > 0) {
 inUseConnectionCount++;
 continue;

代码示例来源:origin: com.squareup.okhttp3/okhttp

if (pruneAndGetAllocationCount(connection, now) > 0) {
 inUseConnectionCount++;
 continue;

代码示例来源:origin: apache/servicemix-bundles

if (pruneAndGetAllocationCount(connection, now) > 0) {
 inUseConnectionCount++;
 continue;

代码示例来源:origin: huxq17/SwipeCardsView

if (pruneAndGetAllocationCount(connection, now) > 0) {
 inUseConnectionCount++;
 continue;

代码示例来源:origin: huxq17/tractor

if (pruneAndGetAllocationCount(connection, now) > 0) {
 inUseConnectionCount++;
 continue;

代码示例来源:origin: duzechao/OKHttpUtils

if (pruneAndGetAllocationCount(connection, now) > 0) {
 inUseConnectionCount++;
 continue;

代码示例来源:origin: com.github.ljun20160606/okhttp

if (pruneAndGetAllocationCount(connection, now) > 0) {
 inUseConnectionCount++;
 continue;

相关文章