File tree Expand file tree Collapse file tree 1 file changed +0
-35
lines changed
kernel/src/test/java/com/itextpdf/kernel/pdf Expand file tree Collapse file tree 1 file changed +0
-35
lines changed Original file line number Diff line number Diff line change @@ -2628,41 +2628,6 @@ public void tokensPositionIsNotUpdatedWhileReadingLengthTest() throws IOExceptio
2628
2628
}
2629
2629
}
2630
2630
2631
- /**
2632
- * Returns the current memory use.
2633
- *
2634
- * @return the current memory use
2635
- */
2636
- private static long getMemoryUse () {
2637
- garbageCollect ();
2638
- garbageCollect ();
2639
- garbageCollect ();
2640
- garbageCollect ();
2641
- long totalMemory = Runtime .getRuntime ().totalMemory ();
2642
- garbageCollect ();
2643
- garbageCollect ();
2644
- long freeMemory = Runtime .getRuntime ().freeMemory ();
2645
- return (totalMemory - freeMemory );
2646
- }
2647
-
2648
- /**
2649
- * Makes sure all garbage is cleared from the memory.
2650
- */
2651
- private static void garbageCollect () {
2652
- try {
2653
- System .gc ();
2654
- Thread .sleep (200 );
2655
- System .runFinalization ();
2656
- Thread .sleep (200 );
2657
- System .gc ();
2658
- Thread .sleep (200 );
2659
- System .runFinalization ();
2660
- Thread .sleep (200 );
2661
- } catch (InterruptedException ex ) {
2662
- ex .printStackTrace ();
2663
- }
2664
- }
2665
-
2666
2631
private static PdfDictionary getTestPdfDictionary () {
2667
2632
HashMap <PdfName , PdfObject > tmpMap = new HashMap <PdfName , PdfObject >();
2668
2633
tmpMap .put (new PdfName ("b" ), new PdfName ("c" ));
You can’t perform that action at this time.
0 commit comments