Summary : fix bug of reallocation logic 22/36422/1
authorseokgil.kang <seokgil.kang@samsung.com>
Fri, 6 Mar 2015 08:45:14 +0000 (17:45 +0900)
committerseokgil.kang <seokgil.kang@samsung.com>
Fri, 6 Mar 2015 08:45:14 +0000 (17:45 +0900)
Change-Id: Icde9964e4d89536287025bd469ce286cfde3dd42
Signed-off-by: seokgil.kang <seokgil.kang@samsung.com>
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/NewLeakDetector.java

index fce729a..c7ad0ae 100644 (file)
@@ -184,14 +184,16 @@ public class NewLeakDetector {
                                        String inputParam = log.getArgs();
                                        String[] splitInputParam = inputParam.split("\\,"); //$NON-NLS-1$
                                        String param = String.valueOf(splitInputParam[0]);
-                                       int rmKey = -1;
+                                       long allocatedAddr = -1;
                                        try {
                                                if (param.contains("0x")) {
-                                                       rmKey = Integer.decode(param);
+                                                       allocatedAddr = Long.decode(param);
                                                } else {
-                                                       rmKey = Integer.parseInt(splitInputParam[0]);
+                                                       allocatedAddr = Long.parseLong(splitInputParam[0]);
                                                }
-                                               leaks.remove(rmKey);
+                                               int rmKey = findAllocatedKey(leaks, allocatedAddr, log.getPid());
+                                               if (rmKey != -1)
+                                                       leaks.remove(rmKey);
                                        } catch (NumberFormatException e) {
                                                Logger.exception(e);
                                        }