Recent

Author Topic: zeoslib av on transaction destruction  (Read 427 times)

jksmithiii

  • New Member
  • *
  • Posts: 11
zeoslib av on transaction destruction
« on: February 05, 2025, 04:32:23 am »
I've read somewhere this bug was fixed in in ver 8 patch. I've applied patch and still get it. Anybody seen this?

procedure TZAbstractTransaction.BeforeDestruction;
var I: Integer;
  Comp: TComponent;
begin
  for i := FLinkedComponents.Count -1 downto 0 do begin
    Comp := TComponent(FLinkedComponents);
  av  --> if Comp.InheritsFrom(TZAbstractRWTxnSeqDataSet) then
      if TZProtectedAbstractRWTxnSeqDataSet(Comp).UpdateTransaction = Self then
        TZProtectedAbstractRWTxnSeqDataSet(Comp).UpdateTransaction := nil;
    if Comp.InheritsFrom(TZAbstractRODataset) then
      if TZProtectedAbstractRODataset(Comp).Transaction = Self then
        TZProtectedAbstractRODataset(Comp).Transaction := nil;
    if Comp.InheritsFrom(TZSQLProcessor) then
      {if TZSQLProcessor(Comp).Transaction = Self then
        TZSQLProcessor(Comp).Transaction := nil;}
  end;
  FreeAndNil(FParams);
  FreeAndNil(FLinkedComponents);
  ReleaseInternalTransaction;
  if Connection <> nil then
    SetConnection(nil);
  inherited BeforeDestruction;
end;
 

jksmithiii

  • New Member
  • *
  • Posts: 11
Re: zeoslib av on transaction destruction
« Reply #1 on: February 09, 2025, 07:07:16 pm »
I need to do some memchecks on this, but prior to destruction, better to manually make sure references to linked components are set to nil before allowing the stock zeos code do it.

 

TinyPortal © 2005-2018