test2.c

来自「unix网络编程的源码」· C语言 代码 · 共 20 行

C
20
字号
/* verify that calling pthread_*attr_destroy() avoids memory leak */

#include	"unpipc.h"

int
main(int argc, char **argv)
{
	pthread_mutexattr_t	mattr;
	pthread_condattr_t	cattr;

	for ( ; ; ) {
		Pthread_mutexattr_init(&mattr);
		Pthread_mutexattr_destroy(&mattr);
		Pthread_condattr_init(&cattr);
		Pthread_condattr_destroy(&cattr);
	}

	exit(0);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?