Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
kohlschuetter committed Jul 27, 2023
2 parents 050f3bd + 47d4eac commit 4b9d4df
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

import java.net.Socket;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

import com.kohlschutter.annotations.compiletime.SuppressFBWarnings;
Expand Down Expand Up @@ -56,9 +58,13 @@ public static void main(String[] args) throws Exception {
}
socket = AFSocket.connectTo(Objects.requireNonNull(addr));
socket.getInputStream().read();

System.gc();

// create some pressure on GC
List<String> list = new ArrayList<>();
while (true) {
// create some pressure on GC
new String("junixsocket".getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8);
list.add(new String("junixsocket".getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8));
}
}
}

0 comments on commit 4b9d4df

Please sign in to comment.