edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Karl Dahlke <eklhad@comcast.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev]  window root
Date: Mon, 06 Jan 2014 05:19:13 -0500	[thread overview]
Message-ID: <20140006051913.eklhad@comcast.net> (raw)

> For example the JS_ValueToString function explicitly says
> that you should protect its return value with a GC root or the string is
> at risk of garbage collection at any stage.

Well edbrowse is not multithreaded.
Within the one and only thread, I immediately make that js value
a property in some other object; I immediately link it to the window tree.
That's why I made it a js string in the first place.
Thus it is referenced.
I keep thinking there should be no trouble.

> Theoretically most of our objects should be protected from GC

Theoretically all of our objects should be protected from GC, unless I did something wrong.

> Admittedly some of this rooting may be paranoia,

And that's ok, I guess, unless we are setting up excess reference counts,
and those objects never go away, even when they aren't used any more,
because the reference count never drops to 0,
and edbrowse has memory leaks.
People like me really are in edbrowse for hours at a time.
So I'm not sure we should swing the big hammer and root everything.
At an intellectual level I'd like to know why everything isn't
already rooted to jswin.

Of course you're doing all the work, not me,
and if rooting everything will get us off the ground,
and get rid of seg faults,
then we can watch for and fix memory leaks later.
I do understand that sometimes you just have to move forward.

Karl Dahlke

             reply	other threads:[~2014-01-06 10:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06 10:19 Karl Dahlke [this message]
2014-01-06 13:05 ` Adam Thompson
  -- strict thread matches above, loose matches on Subject: below --
2014-01-06  0:55 Karl Dahlke
2014-01-06  1:24 ` Chris Brannon
2014-01-06  9:46   ` Adam Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140006051913.eklhad@comcast.net \
    --to=eklhad@comcast.net \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).