Skip to content

documentation: destructors and defer  #46

@ShalokShalom

Description

@ShalokShalom

The documentation shows that we need defer all the time.

proc mainProc() =
  var app = newQApplication()
  defer: app.delete()

  var engine = newQQmlApplicationEngine()
  defer: engine.delete()

  var qVar1 = newQVariant(10)
  defer: qVar1.delete()

  var qVar2 = newQVariant("Hello World")
  defer: qVar2.delete()

  var qVar3 = newQVariant(false)
  defer: qVar3.delete()

  var qVar4 = newQVariant(3.5.float)
  defer: qVar4.delete()

http://filcuc.github.io/nimqml/

Destructors seem to make that superflous. Is this already implemented and the documentation outdated?

Or is it not implementated yet and are you interested in doing that?

Thanks

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