Skip to content

TDecoderResult.Destroy - ByteSegments should not be cleared #153

@JedrzejczykRobert

Description

@JedrzejczykRobert

file: ZXing.DecoderResult;
lines: 79-81

code:

  if Assigned(ByteSegments)
  then
     ByteSegments.Clear;

should be removed, because Count is 0, after extracted from result meta, for example:

if rs.ResultMetaData.ContainsKey(TResultMetaDataType.BYTE_SEGMENTS)  then
begin
  obj := rs.ResultMetaData.Items[TResultMetaDataType.BYTE_SEGMENTS];
  if Supports(obj, IByteSegmentsMetadata, bytesMetadata) then
  begin
    bytesMetadata.Value.Count; // Count is 0
  end;
end;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions