Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3ad66f8

Browse filesBrowse files
authored
Merge pull request hub4j#468 from KostyaSha/fixMemLeak
Fix memory leak.
2 parents a6f3e7d + 70251ea commit 3ad66f8
Copy full SHA for 3ad66f8

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎src/main/java/org/kohsuke/github/GHRepository.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHRepository.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
import java.util.Map;
4949
import java.util.Set;
5050
import java.util.TreeMap;
51+
import java.util.WeakHashMap;
5152

5253
import static java.util.Arrays.*;
5354
import static org.kohsuke.github.Previews.*;
@@ -79,10 +80,10 @@ public class GHRepository extends GHObject {
7980
private boolean _private;
8081
private int forks_count, stargazers_count, watchers_count, size, open_issues_count, subscribers_count;
8182
private String pushed_at;
82-
private Map<Integer,GHMilestone> milestones = new HashMap<Integer, GHMilestone>();
83+
private Map<Integer,GHMilestone> milestones = new WeakHashMap<Integer, GHMilestone>();
8384

8485
private String default_branch,language;
85-
private Map<String,GHCommit> commits = new HashMap<String, GHCommit>();
86+
private Map<String,GHCommit> commits = new WeakHashMap<String, GHCommit>();
8687

8788
@SkipFromToString
8889
private GHRepoPermission permissions;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.