글쓴 사람
        SunNee Dong (clickway at naver.com)
        홈페이지
        
        첨부 파일
        
             
        
        
        
            
            
            
                
                    
                    
                    
                    안녕하세요.
선생님 질문있습니다.
꼭 답변 부탁드립니다
질문-1) response.Close(); <======== 문법 정석대로 한다면....해제 해야되는 거 아닌지요??
아래 코드에서 메모리해제 같은 "해제" 해야할 것이 있나요?
public bool CreateFolder()
{
           bool IsCreated = true;
           try
           {
                   WebRequest request = WebRequest.Create("ftp://192.168.1.103:24/Index");
                   request.Method = WebRequestMethods.Ftp.MakeDirectory;
                   request.Credentials = new NetworkCredential(user, pw);
                   
                   using (var response = (FtpWebResponse)request.GetResponse())
                   {
                        response.Close(); <===== 문법 정석대로 한다면 Close() 메모리 해제? 해야 누수가 안 생기죠? 여기서 Close() 해야되나요?
                   }
           }
           catch (Exception ex)
           {
               IsCreated = false;
           }
           return IsCreated;
}
        
        
                    
                    
                    
                    
                    
    
                    
                    
                    
                    
                    
                
                    [최초 등록일: ]
                    [최종 수정일: 8/18/2024]