为什么lfunc2泄漏而lfunc1不泄漏
- static int ads_lfunc1(void)
- {
- resbuf *phead = acutNewRb(RTLB);
- resbuf *pTail = phead;
- for(size_t idx = 0;idx rbnext = acutNewRb(RTLB);
- pTail = pTail->rbnext = acutNewRb(RTSTR);
- pTail->resval.rstring = _T("Hello");
- pTail = pTail->rbnext = acutNewRb(RTDOTE);
- pTail = pTail->rbnext = acutNewRb(RTSTR);
- pTail->resval.rstring = _T("world");
- pTail = pTail->rbnext = acutNewRb(RTLE);
- }
- pTail = pTail->rbnext = acutNewRb(RTLE);
- acutRelRb(phead);
- return (RSRSLT) ;
- }
- static int ads_lfunc2(void)
- {
- resbuf *phead = acutNewRb(RTLB);
- resbuf *pTail = phead;
- for(size_t idx = 0;idx rbnext =
- acutBuildList(RTLB,RTSTR,_T("HELLO"),RTDOTE,RTSTR,_T("world"),RTLE,0);
- }
- pTail = pTail->rbnext = acutNewRb(RTLE);
- acutRelRb(phead);
- return (RSRSLT) ;
- }
本帖以下内容被隐藏保护;需要你回复后,才能看到! 游客,如果您要查看本帖隐藏内容请 回复 |