Hello,
I used edtFtpj/Free library to upload a file to FTP server.
I worte a very simple code (just login and upload a small file and disconnect) as in the example source code.
I put the binary into my phone (Android OS. 4.04).
But, whenever my program upload the small file (40bytes) to the FTP sever, the memory of my app is increased by 0.1MB.
I need to upload that file every 1 minutes. After several hours, the memory leak becomes serious.
Is this a bug? Or did I make some mistake? Here is my code.
Please help me.. Thanks in advance..
FileTransferClient ftp= new FileTransferClient();
String host = "my host server name";
String userId = "my user id";
String passwd = "my password";
String fileName = "my file to transfer";
try
{
while(true)
{
ftp.setRemoteHost(host);
ftp.setUserName(userId);
ftp.setPassword(passwd);
ftp.connect();
ftp.uploadFile(fileName, fileName);
ftp.disconnect();
sleep(60*1000);
}
}
catch (Exception e)
{
}