2020년 5월 9일 토요일

델파이에서 TAcroPDF 사용후 종료시 프로세서가 종료되지 않을 때

델파이에서 TAcroPDF 사용후 종료시 프로세서가 종료되지 않을 때
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
var
  Ref : Integer;
begin
  Ref := AcroPdf1.ControlInterface._AddRef;
  AcroPdf1.Src := '';
  AcroPdf1.Free;
  AcroPdf1 := Nil;
end;
하거나
AcroPDFLib_Tlb.pas 에서 
Type
TAcroPDF = class(TOleControl)
  ...
  public
    destructor Destroy; override; // <- New Line
  ...
  end;

Implementation
.....  
destructor TAcroPDF.Destroy;
begin
 FIntf := NIL;
 inherited;
end;
하면 정상 종료된다.

댓글 없음:

vscode 에서 파이썬 가상환경을 .venv 를 만들면 새로운 터미널을 생성하면 ((.venv) ) 로 표시된는 것 해결

 vscode 에서 파이썬 가상환경을 .venv 를 만들면 새로운 터미널을 생성하면 ((.venv) ) 로 표시 즉 /Volumes/jglee/AI&Python/lottoly45 % source .venv/bin/activate ((.venv)...