Click here to Skip to main content
15,886,199 members
Home / Discussions / C#
   

C#

 
GeneralRe: What do you think this is about? Pin
Ravi Bhavnani31-Jul-13 12:02
professionalRavi Bhavnani31-Jul-13 12:02 
GeneralRe: What do you think this is about? Pin
Jasmine250131-Jul-13 12:23
Jasmine250131-Jul-13 12:23 
GeneralRe: What do you think this is about? Pin
Ravi Bhavnani31-Jul-13 12:39
professionalRavi Bhavnani31-Jul-13 12:39 
AnswerRe: What do you think this is about? Pin
Bernhard Hiller31-Jul-13 21:16
Bernhard Hiller31-Jul-13 21:16 
AnswerRe: What do you think this is about? Pin
BillWoodruff1-Aug-13 2:09
professionalBillWoodruff1-Aug-13 2:09 
GeneralRe: What do you think this is about? Pin
Jasmine25012-Aug-13 5:56
Jasmine25012-Aug-13 5:56 
QuestionManaging List<Bitmap> Pin
BBatts31-Jul-13 4:34
BBatts31-Jul-13 4:34 
AnswerRe: Managing List<Bitmap> Pin
OriginalGriff31-Jul-13 8:28
mveOriginalGriff31-Jul-13 8:28 
Bitmaps are a scarce resource: they implement IDisposable, so you should clean up behind you, and Dispose all bitmaps you create. If you don't you may well get "Out of Memory" problems long before the actual RAM is exhausted. Additionally, depending on how you initially constructed the bitmaps, you may leave files or streams in use until the bitmap.Dispose method is called by your code, or by the garbage collector.

You need to construct a new image for each that you add to the other list, if you want the original unmodified when the aviList1[index] bitmap is changed.
However, it would look tidier with a foreach loop:
C#
foreach (Bitmap b in originalList)
    aviList1.Add(new Bitmap(b));
Or you could do it with Linq:
C#
aviList.AddRange(originalList.Select(bm => new Bitmap(bm)));
(But that just hides the loop)
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)

GeneralRe: Managing List<Bitmap> Pin
BillWoodruff1-Aug-13 2:35
professionalBillWoodruff1-Aug-13 2:35 
GeneralRe: Managing List<Bitmap> Pin
OriginalGriff1-Aug-13 2:54
mveOriginalGriff1-Aug-13 2:54 
AnswerRe: Managing List<Bitmap> Pin
Pete O'Hanlon1-Aug-13 3:04
mvePete O'Hanlon1-Aug-13 3:04 
QuestionRegular expressions. Pin
Septimus Hedgehog31-Jul-13 3:06
Septimus Hedgehog31-Jul-13 3:06 
AnswerRe: Regular expressions. Pin
Pete O'Hanlon31-Jul-13 3:09
mvePete O'Hanlon31-Jul-13 3:09 
GeneralRe: Regular expressions. Pin
Septimus Hedgehog31-Jul-13 3:15
Septimus Hedgehog31-Jul-13 3:15 
QuestionTreeview in windows application Pin
Arun kumar Gautam31-Jul-13 0:26
Arun kumar Gautam31-Jul-13 0:26 
AnswerRe: Treeview in windows application Pin
Simon_Whale31-Jul-13 0:46
Simon_Whale31-Jul-13 0:46 
AnswerRe: Treeview in windows application Pin
Abhinav S31-Jul-13 1:12
Abhinav S31-Jul-13 1:12 
QuestionRe: Treeview in windows application Pin
Eddy Vluggen31-Jul-13 3:16
professionalEddy Vluggen31-Jul-13 3:16 
AnswerRe: Treeview in windows application Pin
Arun kumar Gautam31-Jul-13 3:19
Arun kumar Gautam31-Jul-13 3:19 
QuestionProblem with treeview in windows application Pin
Arun kumar Gautam31-Jul-13 0:25
Arun kumar Gautam31-Jul-13 0:25 
QuestionOO Design Pin
KeithF30-Jul-13 22:53
KeithF30-Jul-13 22:53 
QuestionRe: OO Design Pin
Eddy Vluggen31-Jul-13 8:36
professionalEddy Vluggen31-Jul-13 8:36 
AnswerRe: OO Design Pin
KeithF31-Jul-13 21:58
KeithF31-Jul-13 21:58 
Questionfilter interface Pin
Atul Kumar Singh230-Jul-13 19:44
Atul Kumar Singh230-Jul-13 19:44 
AnswerRe: filter interface Pin
Abhinav S30-Jul-13 19:53
Abhinav S30-Jul-13 19:53 

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.