a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 intuition.library
  ActivateGadget
  ActivateWindow
  AddClass
  AddGList
  AddGadget
  AllocRemember
  AllocScreenBuffer
  AutoRequest
  BeginRefresh
  BuildEasyRequestArgs
  BuildSysRequest
  ChangeScreenBuffer
  ChangeWindowBox
  ClearDMRequest
  ClearMenuStrip
  ClearPointer
  CloseScreen
  CloseWindow
  CloseWorkBench
  CurrentTime
  DisplayAlert
  DisplayBeep
  DisposeObject
  DoGadgetMethodA
  DoubleClick
  DrawBorder
  DrawImage
  DrawImageState
  EasyRequestArgs
  EndRefresh
  EndRequest
  EraseImage
  FreeClass
  FreeRemember
  FreeScreenBuffer
  FreeScreenDrawInfo
  FreeSysRequest
  GadgetMouse
  GetAttr
  GetDefPrefs
  GetDefaultPubScreen
  GetPrefs
  GetScreenData
  GetScreenDrawInfo
  HelpControl
  InitRequester
  IntuiTextLength
  ItemAddress
  LendMenus
  LockIBase
  LockPubScreen
  LockPubScreenList
  MakeClass
  MakeScreen
  ModifyIDCMP
  ModifyProp
  MoveScreen
  MoveWindow
  MoveWindowInFrontOf
  NewModifyProp
  NewObject
  NextObject
  NextPubScreen
  ObtainGIRPort
  OffGadget
  OffMenu
  OnGadget
  OnMenu
  OpenScreen
  OpenScreenTagList
  OpenWindow
  OpenWindowTagList
  OpenWorkBench
  PointInImage
  PrintIText
  PubScreenStatus
  QueryOverscan
  RefreshGList
  RefreshGadgets
  RefreshWindowFrame
  ReleaseGIRPort
  RemakeDisplay
  RemoveClass
  RemoveGList
  RemoveGadget
  ReportMouse
  Request
  ResetMenuStrip
  RethinkDisplay
  ScreenDepth
  ScreenPosition
  ScreenToBack
  ScreenToFront
  ScrollWindowRaster
  SetAttrsA
  SetDMRequest
  SetDefaultPubScreen
  SetEditHook
  SetGadgetAttrsA
  SetMenuStrip
  SetMouseQueue
  SetPointer
  SetPrefs
  SetPubScreenModes
  SetWindowPointerA
  SetWindowTitles
  ShowTitle
  SizeWindow
  SysReqHandler
  TimedDisplayAlert
  UnlockIBase
  UnlockPubScreen
  UnlockPubScreenList
  ViewAddress
  ViewPortAddress
  WBenchToBack
  WBenchToFront
  WindowLimits
  WindowToBack
  WindowToFront
  ZipWindow
Include
GuruMeditation
Docs » Autodocs » intuition.library » FreeClass

NAME

	FreeClass -- Frees a boopsi class created by MakeClass(). (V36)

SYNOPSIS

	success = FreeClass( ClassPtr )
D0 A0
BOOL FreeClass( struct IClass * );

FUNCTION

	For class implementors only.
Tries to free a boopsi class created by MakeClass(). This
won't always succeed: classes with outstanding objects or
with subclasses cannot be freed. You cannot allow the code
which implements the class to be unloaded in this case.
For public classes, this function will *always* remove
the class (see RemoveClass() ) making it unavailable, whether
it succeeds or not.
If you have a dynamically allocated data for your class (hanging
off of cl_UserData), try to free the class before you free the
user data, so you don't get stuck with a half-freed class.

INPUTS

	ClassPtr - pointer to a class created by MakeClass().

RESULT

	Returns FALSE if the class could not be freed.  Reasons include,
but will not be limited to, having non-zero cl_ObjectCount or
cl_SubclassCount.
Returns TRUE if the class could be freed.
Calls RemoveClass() for the class in either case.

EXAMPLE

	Freeing a private class with dynamically allocated user data:
freeMyClass( cl )
struct IClass *cl;
{
struct MyPerClassData *mpcd;
mpcd = (struct MyPerClassData *) cl->cl_UserData;
if ( FreeClass( cl ) )
{
FreeMem( mpcd, sizeof mpcd );
return ( TRUE );
}
else
{
return ( FALSE );
}
}

BUGS

SEE ALSO

MakeClass(), Document "Basic Object-Oriented Programming System for Intuition", and the "boopsi Class Reference" document.

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Tristar & Red Sector Inc.

SPB
TRSI
SCX
RBS

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se