private void remove_from_memory(object sender, EventArgs e, Panel p, hole h)
        {
            Label lbl = sender as Label;
            int   pos = p.VerticalScroll.Value;

            //p.clear and then change the holes and then merge adjecent holes and the draw again
            p.Controls.Clear();
            if (h.get_color() == Color.Black)
            {
                int index = memory.search_process(h);
                memory.add_hole(h);
                memory.remove_process(index);
                memory.merge_holes();
            }
            else
            {
                int count = memory.get_memory_processes().Count;
                for (int j = 0; j < count; j++)
                {
                    List <hole> t = memory.get_memory_processes();
                    hole        q = t[j];
                    if (q.get_color() == h.get_color())
                    {
                        int index = memory.search_process(q);
                        memory.add_hole(q);
                        memory.remove_process(index);
                        memory.merge_holes();
                        j--;
                        count--;
                    }
                }
            }
            memory_draw();
            p.VerticalScroll.Value = pos;
            //    MessageBox.Show("Process has been removed successfully");
        }