我正在調試內存泄漏,不得不潛入CompletableFuture內部。有這一段代碼(CompletableFuture.uniComposeStage): CompletableFuture<V> g = f.apply(t).toCompletableFuture();
...
CompletableFuture<V> d = new CompletableFuture<V>();
Uni
如果我調用某個外部庫返回List[LargeObjects](這是一個包含很多字段的對象的列表),這將佔用大量堆內存。但是,我只對每個元素的name(字符串)字段感興趣。所以,如果我有這樣的代碼: externalLib.getLargeObjects.map(e => e.name) match {
case l: List[String] =>
???
case