Large List resources problem

Nov 15 2009 2:21 PM

Hi everyone. I am working on Movie collection application.. I have "Film" class, with Name, Genre, Picture.. and few other Propertyes..and methods for saving the Film object in access database but like "oleObject", not each property at diferent columns.. example column[0]=ID(typeof (int), column[1] = Film object (serialized as byte[]) typeof (oleObject in access)) hope you understand me..
now the problem is: when i read from database like ("select * from table1"), i put all records in list<Film>... and the database for now contains few films, but in task manager my application use over 100 MB of Ram.. so is there any way to improve my application so it wont use that much resources??  i use dispose method like this

public class Film : IDisposable
{
         ... // some code
         public void Dispose()
         {
            This.Picture = null;
         }
      ..// other code..
}
 
i have on my mind (not to save the image in the database, but save in folder, and image location in database.. but it would lead to small database, and lot of memory usage in runtime.. so that is bad solution.. )
 
so any sugestion please?
Thank you wery much

Answers (2)