Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 810E219132 for ; Tue, 15 Mar 2016 14:55:08 +0000 (UTC) Received: (qmail 60963 invoked by uid 500); 15 Mar 2016 14:55:08 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 60923 invoked by uid 500); 15 Mar 2016 14:55:08 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 60914 invoked by uid 99); 15 Mar 2016 14:55:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Mar 2016 14:55:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 60B0CC0250 for ; Tue, 15 Mar 2016 14:55:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.799 X-Spam-Level: * X-Spam-Status: No, score=1.799 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id GMqWbUQTQvj2 for ; Tue, 15 Mar 2016 14:55:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTP id 475FD5FADD for ; Tue, 15 Mar 2016 14:55:06 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5159EE0095 for ; Tue, 15 Mar 2016 14:55:05 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 5029C3A05E3 for ; Tue, 15 Mar 2016 14:55:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1735087 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x: ./ src/main/csharp/Util/LRUCache.cs Date: Tue, 15 Mar 2016 14:55:05 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160315145505.5029C3A05E3@svn01-us-west.apache.org> Author: tabish Date: Tue Mar 15 14:55:05 2016 New Revision: 1735087 URL: http://svn.apache.org/viewvc?rev=1735087&view=rev Log: Apply fix for problems with LRUCache not properly cleaning up after itself. Fixes [AMQNET-AMQNET-521]. (See https://issues.apache.org/jira/browse/AMQNET-AMQNET-521) Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/ (props changed) activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Util/LRUCache.cs Propchange: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Mar 15 14:55:05 2016 @@ -1,4 +1,4 @@ /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x:1082291,1135831,1137081,1171843,1171874,1177390,1177395,1186568,1187123,1238881,1293360,1294890,1295257,1311395,1312026,1374469,1375295,1376782 /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0:692591,693525 /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.1.0:788230,788233,790183 -/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk:1689517,1695609-1695737,1705945,1715303,1723133 +/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk:1689517,1695609-1695737,1705945,1715303,1723133,1735085 Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Util/LRUCache.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Util/LRUCache.cs?rev=1735087&r1=1735086&r2=1735087&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Util/LRUCache.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Util/LRUCache.cs Tue Mar 15 14:55:05 2016 @@ -47,6 +47,7 @@ namespace Apache.NMS.ActiveMQ.Util public void Clear() { dictionary.Clear(); + entries.Clear(); } public int Count @@ -65,12 +66,12 @@ namespace Apache.NMS.ActiveMQ.Util get { return dictionary[key]; } set { - TValue currentValue = default (TValue); + TValue currentValue; // Moved used item to end of list since it been used again. if (dictionary.TryGetValue(key, out currentValue)) { KeyValuePair entry = - new KeyValuePair(key, value); + new KeyValuePair(key, currentValue); entries.Remove(entry); }