Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-08-2013, 12:17 PM   #1
Registered: Mar 2007
Distribution: Fedora
Posts: 263

Rep: Reputation: 23
better practice to work with saved buffer

hello friends,
I am working on a gtk_list_store, that will save the rows to a file
(set_contents(file, buffer))
After saving the datas to a file, without exiting, I will like to edit
the file (as buffer) again. For that I have 2 option in my knowledge:

1) save the data, g_free(buffer), list_store_clear, reload the saved
2) save the buffer to the file, but continue working with that without

both seems to work, but which is the better practice?
Old 05-08-2013, 12:33 PM   #2
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
what is the reason of saving the data to file? if it is just a persistence across application restarts, then the second option is better


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can this harddrive be saved? not data recovery. Gparted doesn't want to work with it. keithostertag Linux - Hardware 3 02-19-2013 07:05 PM
How does the sed buffer space work? ShanxT Programming 5 10-11-2011 10:53 AM
Does OCR work in practice, kooka ocrad? lugoteehalt Linux - Newbie 7 02-04-2009 12:12 PM
What is the difference between the free buffer and buffer in the buffer hash queue? Swagata Linux - Enterprise 0 05-25-2006 11:57 PM
frame buffer doesn't seem to work hubabuba Fedora 2 05-03-2005 12:39 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:31 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration