Bonjour,
J'ai compilé un code-source très élémentaire provenant de la documentation de la SDL. Je teste l'exécutable sous Valgrind qui me détecte un grand nombre d'erreurs et m'affiche des fuites. Quelqu'un a-t-il déjà expérimenté cela ? Est-ce un bug de la SDL ?
Le code-source :
et un extrait du diagnotic de Valgrind :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 /* leaks_doc.c */ #include <stdio.h> #include <SDL/SDL.h> /* All SDL App's need this */ int main() { printf("Initializing SDL.\n"); /* Initialize defaults, Video and Audio */ if((SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO)==-1)) { printf("Could not initialize SDL: %s.\n", SDL_GetError()); exit(-1); } printf("SDL initialized.\n"); printf("Quiting SDL.\n"); /* Shutdown all subsystems */ SDL_Quit(); printf("Quiting....\n"); exit(0); }
Merci pour tout éclaircissement.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 $ valgrind --leak-check=yes ./leaks_doc ==22493== 25,560 bytes in 710 blocks are possibly lost in loss record 47 of 47 LEAK SUMMARY: ==22493== definitely lost: 14 bytes in 2 blocks. ==22493== possibly lost: 25,660 bytes in 715 blocks. ==22493== still reachable: 51,887 bytes in 2,528 blocks.
Partager