On 12/4/97 8:46 AM, Patrick J. Dughi (dughi@IMAXX.NET) stated:
>        It appears that the "read_obj" calls within the create_new_board
>function never releases the object again.  So, the objects are created,
>but never placed anywhere, and just take up memory.  Just add the line
>extract_obj(obj);
>
>at/around line 112, after the line
>BOARD_MESSAGES(temp_board)=NULL;
>
>        Should clear everything up just dandy.
Another one, for those who use OLC:
in create_new_board, if called from init_boards, if there is a file for a
baord but the object is missing... it will crash.
The fix:
                if(!(fl = fopen(filename,"w"))) {
                        log("Hm. Error while creating new board file '%s'", filename);
                } else {
                        obj = read_object(board_vnum, VIRTUAL);
+                       if (!obj) {
+                               fclose(fl);
+                               remove(filename);
+                               release_buffer(buf);
+                               return NULL;
+                       }
That will fix the problem.  Doesnt matter that you return NULL, because
this is only a worry when called from init_boards, which doesn't keep the
returned value anyways.
- Chris Jacobson
     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST