응용 프로그램에서 충돌이 발생할 때까지 메모리를 계속 사용하는 작업이 있습니다. processExplorer을 살펴보면 다음 함수가 호출 될 때마다 약 50MB가 할당된다는 것을 알았습니다 (30 번 호출). 이 메모리는 GarbageCollect를 호출하더라도 함수가 종료 될 때 해제되지 않습니다. 같은 전화 기능 참고 :powerbuilder 메모리가 해제되지 않았습니다.
Of_IsOrario, Of_GetCell, Of_GetRowCount, Of_GetColCOunt
그냥 값을 반환 (할당되지 메모리)
long ll_file, i, j, ll_bytes, ll_fileWithTitles
double ld_value
string ls_line
n_cst_string str
ll_fileWithTitles = FileOpen(as_fileName + "text.txt", LineMode!, Write!, Shared!, Replace!, EncodingAnsi!)
ll_file = FileOpen(as_fileName, LineMode!, Write!, Shared!, Replace!, EncodingAnsi!)
if ll_file < 0 then
MessageBox("Σφάλμα", "Could not create file " + as_fileName)
return false
end if
for i = 1 to Of_GetColCount()
if in_tasks[i].Of_IsOrario() then
ls_line += "~tO" + in_Tasks[i].is_symbol
else
ls_line += "~t" + in_Tasks[i].is_symbol
end if
next
FileWrite(ll_fileWithTitles, ls_line)
for i = 1 to Of_GetRowCount()
ls_line = ""
for j = 1 to Of_GetColCount()
ld_value = -Of_GetCell(i, j)
if ls_line <> "" then ls_line += "~t"
ls_line += string(ld_value)
next
ls_line = str.Of_GlobalReplace(ls_line, ",", ".")
if IsNull(ls_line) then
ls_line = ls_line
end if
ll_bytes = FileWrite(ll_file, ls_line)
ls_line = string(in_matrix[i].il_agentId) + "~t" + ls_line
ll_bytes = FileWrite(ll_fileWithTitles, ls_line)
next
FileClose(ll_file)
FileClose(ll_fileWithTitles)
return true
파워 빌더 버전 :
[...]
은 또한 다음을 추가 그것? –
왜 'if IsNull (ls_line) then ls_line = ls_line ...'구조를 가지고 있습니까? 그것은 무엇이든 바뀌 었습니까? 나는'ls_line = ""' –