Click here to Skip to main content
15,889,909 members
Home / Discussions / C#
   

C#

 
GeneralRe: memory footprint of Dictionary Pin
George_George21-May-08 4:28
George_George21-May-08 4:28 
GeneralRe: memory footprint of Dictionary Pin
Guffa21-May-08 11:17
Guffa21-May-08 11:17 
GeneralRe: memory footprint of Dictionary Pin
George_George25-May-08 1:38
George_George25-May-08 1:38 
GeneralRe: memory footprint of Dictionary Pin
Guffa25-May-08 13:07
Guffa25-May-08 13:07 
GeneralRe: memory footprint of Dictionary Pin
George_George25-May-08 19:14
George_George25-May-08 19:14 
GeneralRe: memory footprint of Dictionary Pin
Guffa25-May-08 22:05
Guffa25-May-08 22:05 
GeneralRe: memory footprint of Dictionary Pin
George_George25-May-08 22:19
George_George25-May-08 22:19 
AnswerRe: memory footprint of Dictionary Pin
PIEBALDconsult17-May-08 5:50
mvePIEBALDconsult17-May-08 5:50 
1. I'm fairly sure that the capacity of the Dictionary will not be reduced when items are removed, but Dictionary doesn't have a Capacity property to check (unlike List).

Personally, I would not consider the memory used by items in the Dictionary as part of the Dictionary's footprint; after all, an instance of some class may be in several collections at once.

If the Dictionary holds the only reference to a particular instance and you remove that item, the instance will be garbage collected (at some point later).


2. With a List you can Remove entries and then set .Capacity to trim off the excess, not so with Dictionary. Frown | :(
GeneralRe: memory footprint of Dictionary Pin
George_George17-May-08 21:27
George_George17-May-08 21:27 
GeneralRe: memory footprint of Dictionary Pin
PIEBALDconsult18-May-08 5:01
mvePIEBALDconsult18-May-08 5:01 
GeneralRe: memory footprint of Dictionary Pin
George_George20-May-08 22:08
George_George20-May-08 22:08 
QuestionHow can I ... Pin
maresp198217-May-08 1:03
maresp198217-May-08 1:03 
AnswerRe: How can I ... Pin
Christian Graus17-May-08 1:06
protectorChristian Graus17-May-08 1:06 
GeneralRe: How can I ... Pin
maresp198217-May-08 1:50
maresp198217-May-08 1:50 
GeneralRe: How can I ... [modified] Pin
#realJSOP17-May-08 2:26
mve#realJSOP17-May-08 2:26 
GeneralRe: How can I ... Pin
maresp198217-May-08 3:08
maresp198217-May-08 3:08 
GeneralRe: How can I ... Pin
#realJSOP17-May-08 3:13
mve#realJSOP17-May-08 3:13 
GeneralRe: How can I ... Pin
maresp198217-May-08 3:45
maresp198217-May-08 3:45 
GeneralRe: How can I ... Pin
#realJSOP17-May-08 4:07
mve#realJSOP17-May-08 4:07 
Questioncrawler Pin
Bhim Prakash Singh17-May-08 0:55
Bhim Prakash Singh17-May-08 0:55 
AnswerRe: crawler Pin
Christian Graus17-May-08 1:06
protectorChristian Graus17-May-08 1:06 
AnswerRe: crawler Pin
Abhijit Jana17-May-08 1:10
professionalAbhijit Jana17-May-08 1:10 
AnswerRe: crawler Pin
Michael Schubert17-May-08 4:03
Michael Schubert17-May-08 4:03 
AnswerRe: crawler Pin
Pete O'Hanlon17-May-08 9:15
mvePete O'Hanlon17-May-08 9:15 
Questionis there anyone to help me?? Pin
minmin200816-May-08 23:09
minmin200816-May-08 23:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.