Comments (4)
Or i guess it could be even better if event bus has client-specific scope i.e each client has its own event bus and listeners. So once client is done, so all the client-related things will be collected by GC. In this case we don't really need to have a way to remove listeners. We can silence them if it's required until the client is done.
from bt.
I'd prefer to stick with one event bus per runtime, but this is definitely a (minor) memory leak, so it would make sense to remove torrent-specific listeners, once the torrent is done or cancelled (i.e. the corresponding BtClient has terminated). The best place to do this should be somewhere in the processing chain (see bt.processor.TorrentProcessorFactory)
from bt.
but this is definitely a (minor) memory leak
Each successful handshake adds two listeners. This can be a serious memory leak. Especially when remote peer is malignant and creates incoming connections in loop.
bt/bt-core/src/main/java/bt/net/PeerConnectionFactory.java
Lines 191 to 202 in 6a17e0e
from bt.
I guess it's around 30 bytes per connection, does not seem so critical. But again, I agree that this needs to be addressed.
from bt.
Related Issues (20)
- [BUG] Something dCan the project run directly? What I need is to get the metadata according to infohashoes not work as it should HOT 5
- [BUG] Many Incoming Encryption fail with InvalidMessage HOT 1
- [BUG] Weird metainfo validation error in CLI HOT 3
- [BUG] springboot use HOT 1
- how to download the file range pieces? HOT 2
- [BUG] Something does not work as it should
- Gradle issues with cling dependency library (upnp module) HOT 3
- Running CliClient.java Locally Reports an Error HOT 1
- java.lang.NoSuchMethodError: No virtual method getAnnotatedSuperclass()Ljava/lang/reflect/AnnotatedType; in class Ljava/lang/Class; or its super classes (declaration of 'java.lang.Class' appears in /apex/com.android.art/javalib/core-oj.jar) HOT 2
- Vulnerable dependencies
- [BUG] Cling 2.2.1 not found in Maven Central HOT 3
- How to access DHT Database at runtime? HOT 1
- Stopping client and stopWhenDownloaded() throws java.lang.RuntimeException HOT 1
- How can I get the info.files[0].filehash info
- [BUG] Something does not work as it should
- Dependency org.yaml:snakeyaml, leading to CVE problem
- Does it support Android?
- [BUG] Android - only maxSimultaneouslyAssignedPieces are downloaded if PieceSelector.getNextPieces supplies subset of all pieces in torrent HOT 3
- [QUESTION] Code affecting the performance HOT 2
- [BUG] Cannot decode torrent due to validation error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bt.