Re: Proper way of making a single-pointer smob

2013-05-30 Thread Sun Yijiang
Thank you guys, I got it through. Best, Yijiang 2013/5/29 Mike Gran : >>Hi guys, > > >>I'm using a very simple smob which only carries a pointer in the >>immediate word. It works fine, but what worries me is that the free >>function seems never called. Am I doing anything wrong? What's the >>

Re: Proper way of making a single-pointer smob

2013-05-30 Thread Ludovic Courtès
Mike Gran skribis: > So, it is probably not really a Guile bug, but, rather, that calling > scm_gc from within atexit() is a bad idea. Oh, OK. In general, I wouldn’t make any strong assumption as to when/whether a SMOB free function will be called. Ludo’.

Re: Proper way of making a single-pointer smob

2013-05-30 Thread Mike Gran
> Mike Gran skribis: >> 3. Some versions of Guile have a bug where the last smob defined >> in your program is never freed, even if you've cleared out the >> pointers and called scm_gc. > What is this?  I’d be happy to read more details.  :-) To be more specific, if you want to make sure the G

Re: Proper way of making a single-pointer smob

2013-05-29 Thread Ludovic Courtès
Mike Gran skribis: > 3. Some versions of Guile have a bug where the last smob defined > in your program is never freed, even if you've cleared out the > pointers and called scm_gc. What is this? I’d be happy to read more details. :-) Ludo’.

Re: Proper way of making a single-pointer smob

2013-05-29 Thread Mike Gran
>Hi guys, >I'm using a very simple smob which only carries a pointer in the >immediate word.  It works fine, but what worries me is that the free >function seems never called.   Am I doing anything wrong?  What's the >standard way of making such kind of smob? What you are doing is mostly right,

Re: Proper way of making a single-pointer smob

2013-05-29 Thread Panicz Maciej Godek
2013/5/29 Sun Yijiang > Hi guys, > > I'm using a very simple smob which only carries a pointer in the > immediate word. It works fine, but what worries me is that the free > function seems never called. Am I doing anything wrong? What's the > standard way of making such kind of smob? > > C++

Proper way of making a single-pointer smob

2013-05-29 Thread Sun Yijiang
Hi guys, I'm using a very simple smob which only carries a pointer in the immediate word. It works fine, but what worries me is that the free function seems never called. Am I doing anything wrong? What's the standard way of making such kind of smob? C++ code listed below: --