divyang4481 / mipt-hw

Automatically exported from code.google.com/p/mipt-hw
0 stars 0 forks source link

task13 List(Reuk) #163

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
reuk_kirill\task13_List

Original issue reported on code.google.com by jiraff...@gmail.com on 15 Dec 2012 at 10:22

GoogleCodeExporter commented 9 years ago
Делаю несложную модификацию кода, чтобы 
отслеживать утечки (закоммитил в SVN, можете 
сделать SVN->Update и посмотреть).

Запускаю Ваши тесты:
0-element list with values from 1 to 10
1 2 3 4 5 6 7 8 9 10 
Insert 100 in the front
100 1 2 3 4 5 6 7 8 9 10 
Split into 2 separate lists
1 2 3 4 5 6 7 8 9 
100 10 
Make a second list with the 2 first and 2 last elements from the first one
1 2 8 9 
Delete those elements from the first list
3 4 5 6 7 
100 10 
Created: 20
Deleted: 9

Вывод: утечки памяти.

Решение не принято.

Original comment by aivyu...@gmail.com on 22 Dec 2012 at 1:45

GoogleCodeExporter commented 9 years ago

Original comment by kirillr...@gmail.com on 22 Dec 2012 at 2:59

GoogleCodeExporter commented 9 years ago
Теперь в main вставляю следующий тест 
(закоммитил в svn):
   TList l1;
   for (int i = 0; i < 10; ++i)
      l1.PushBack(i);

Запускаю:
Created: 10
Deleted: 0

Снова утечки.

Original comment by aivyu...@gmail.com on 22 Dec 2012 at 5:47

GoogleCodeExporter commented 9 years ago

Original comment by kirillr...@gmail.com on 22 Dec 2012 at 7:19

GoogleCodeExporter commented 9 years ago
Снова утечки.

Новый тест закоммитил. Разбирайтесь.

Original comment by aivyu...@gmail.com on 22 Dec 2012 at 8:20

GoogleCodeExporter commented 9 years ago

Original comment by kirillr...@gmail.com on 22 Dec 2012 at 9:39

GoogleCodeExporter commented 9 years ago
Решение принято.

Минус 4 балла.

Original comment by aivyu...@gmail.com on 23 Dec 2012 at 8:51