[gtk-server] Re: GtkTextIter
- From: "John Spikowski" <johnspikowski@xxxxxxxxx>
- To: <gtk-server@xxxxxxxxxxxxx>
- Date: Mon, 20 Nov 2006 03:22:25 -0800
Peter,
Does the DLL / SO share the same memory issues with the TCP interface? I was
under the impression that all memory is release when a DLL / SO is dropped.
John
> -----Original Message-----
> From: gtk-server-bounce@xxxxxxxxxxxxx
> [mailto:gtk-server-bounce@xxxxxxxxxxxxx] On Behalf Of Peter van Eerten
> Sent: Monday, November 20, 2006 3:11 AM
> To: gtk-server@xxxxxxxxxxxxx
> Subject: [gtk-server] Re: GtkTextIter
>
> Indeed I have used this construction in several situations
> successfully, also other people did. At my newLisp page you
> can find some examples (the IDE, the UDP chat and the e-text reader).
>
> I am not sure what happens with the 'copy' action though.
>
> In fact, it is always troublesome for interpreted languages
> to reach memory which is addressed by C-pointers. In the
> current situation the best you can do is using another widget
> to claim memory.
>
> Citeren Ian Haywood <ihaywood@xxxxxxxxxxxx>:
>
> > On Monday 20 November 2006 02:46, Peter van Eerten wrote:
> > > Hi Ian,
> > >
> > > For the GtkIter widget you need to workaround your
> problem with a trick.
> > > Indeed, there is no such function as a 'gtk_iter_new'. Therefore,
> > > you must allocate memory with some other widget. I always use
> > > 'gtk_frame_new' for this.
> > Thanks for this.
> >
> > > Now your variable 'iter' points to allocated memory for a frame,
> > > where GTK can store information for an iter-structure as well.
> > Overwriting the frame data?
> > I'd be worried this would cause memory leaks or similar
> weird issues
> > when GTK tries to clean up the frame structure that's been
> scribbled
> > over by the text_iter structure. Also we are praying that never
> > sizeof(GtkTextIter) > sizeof (GtkFrame) However you imply that have
> > used this technique in practice without problems, is that right?
> >
> > I suppose you could immediately pass the frame object to
> > gtk_text_iter_copy
> > ()
> > which would give you a "real" text_iter memory allocation to use.
> >
> > Ian
> >
>
>
> --
> http://www.gtk-server.org
>
- Follow-Ups:
- [gtk-server] Re: GtkTextIter
- From: Peter van Eerten
- References:
- [gtk-server] Re: GtkTextIter
- From: Peter van Eerten
Other related posts:
- » [gtk-server] GtkTextIter
- » [gtk-server] Re: GtkTextIter
- » [gtk-server] Re: GtkTextIter
- » [gtk-server] Re: GtkTextIter
- » [gtk-server] Re: GtkTextIter
- » [gtk-server] Re: GtkTextIter
- » [gtk-server] Re: GtkTextIter
- » [gtk-server] Re: GtkTextIter
- [gtk-server] Re: GtkTextIter
- From: Peter van Eerten
- [gtk-server] Re: GtkTextIter
- From: Peter van Eerten